| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D147375
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
NSS_CMSDigestContext_FinishMultiple r=nss-reviewers,jschanck
As NSS_CMSDigestContext_FinishMultiple may leave its outparam unchanged when it returns SECSuccess, ensure
that we set the value to NULL prior to invoking it. If this has happened because data was missing and hence the
digest was never updated, the secasn1d parser will notice the missing child and raise a decodeError.
Differential Revision: https://phabricator.services.mozilla.com/D145425
|
| |
|
|
|
|
|
|
| |
nssCKFWInstance_CreateObjectHandle. r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D146765
|
|
|
|
|
|
|
|
| |
passwords and pkcs5v2 encoding.
Don't use NULL when encoding UTF8 with pkcs5v2. Fix a bug here when converting from UCS2 to UTF8 we would add a double NULL when adding a NULL.
Differential Revision: https://phabricator.services.mozilla.com/D141538
|
| |
|
|
|
|
|
|
|
|
|
|
| |
r=djackson
Added test cases for alerts during and pre handshake as well as TLS 1.3 only after handshake (application data) cases due to unsupported de- and encryption of lower TLS version records in gtest.
Adjusted some test cases that expect failed connections to the updated alerts.
Differential Revision: https://phabricator.services.mozilla.com/D144029
|
|
|
|
|
|
| |
ClientHello.legacy_version. r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D144279
|
|
|
|
|
|
| |
ECPointFormat extension alerts. r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D144420
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GROUP. r=keeler,nss-reviewers,djackson
In an iteration over elements of an indefinite-length encoded GROUP
(sec_asn1d_next_in_group), the child of the current state is responsible for
parsing the GROUP's end-of-contents octets---a call to
sec_asn1d_parse_end_of_contents(state->child) sets the endofcontents flag for
state->child and a later call to sec_asn1d_next_in_group checks
state->child->endofcontents and terminates the iteration.
In an iteration over elements of an indefinite-length encoded SEQUENCE
(sec_asn1d_next_in_sequence), on the other hand, the current state, not its
child, handles the end-of-contents octets.
Prior to this commit, an error would occur when state pointed to an
indefinite-length encoded GROUP and state->child pointed to an
indefinite-length encoded SEQUENCE. In this case, state->child would be passed
to sec_asn1d_parse_end_of_contents to parse the SEQUENCE's end-of-contents
octets. This would set the endofcontents flag for state->child, and this would
be misinterpreted as an end-of-iteration signal for the surrounding GROUP.
Differential Revision: https://phabricator.services.mozilla.com/D142985
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D137702
|
|
|
|
|
|
| |
r=rrelyea
Differential Revision: https://phabricator.services.mozilla.com/D146334
|
|
|
|
|
|
| |
r=nss-reviewers,nkulatova
Differential Revision: https://phabricator.services.mozilla.com/D142715
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D145355
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D144633
|
| |
|
| |
|
|
|
|
|
|
| |
zero-length record/fragment handling tests. Enabled tls fuzzer empty alert test. r=djackson
Differential Revision: https://phabricator.services.mozilla.com/D141841
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
boundaries. r=djackson
Old overlong record check flow:
1.) There is a check for the default maximally allowed record size in ssl3gthr.c/ssl3_GatherData after reception of TLS records. In the same file the DTLS reception buffers are set to the maximum possible record size in dtls_GatherData.
2.) Next the ssl3_HandleRecord handler checks TLS and DTLS records sizes, considering possibly set size limits by the record-size-limit-extension and the maximally approximated cipher expansion possible in NSS.
3.) Until this patch there was a less strict redundant size check in ssl3con.c/ssl3_UnprotectRecord. In tls13con.c/tls13_UnprotectRecord and ssl3con.c/ssl3_UnprotectRecord the plaintext size is checked for validity after unprotecting (plaintext checks were not changed in this patch).
4.) DTLS errors regarding record size and unprotecting are inconsistently sometimes propagated to the peer (alerts) and sometimes silently dropped.
Changes:
1.) In ssl3gthr.c TLS 1.3 specific cases for overlong record checks and DTLS buffer allocation have been added.
2.) The ssl3_HandleRecord handler checks for RFC compliant records sizes (all TLS versions), considering limits set by record_size_limit_extension. This is less strict for TLS <= 1.2, stricter checks have been moved to the unprotection functions to create a similar 'check flow/levels' for all TLS versions.
3.)
- TLS <= 1.2: Moved strict check for maximum allowed plaintext + approximated maximum cipher expansion to ssl3con.c/ssl3_UnprotectRecord.
- TLS 1.3: Added strict check for maximum allowed plaintext + actually used cipher expansion to tls13con.c/tls13_UnprotectRecord.
(Maximum allowed plaintext considers limits set by record_size_limit_extension)
4.) Following RFC6347, Section 4.1.2.7 DTLS errors regarding records and unprotecting and now consistently dropped silently.
Added Tests:
- Positive tests (All (D)TLS versions): Test that largest valid plainext + encryption expansion are successfully sent and handled.
- Negative tests (All (D)TLS versions): Test that all added/updated boundaries lead to the expected alerts. Tested with smallest illegal record size for each of the mentioned checks.
Differential Revision: https://phabricator.services.mozilla.com/D138529
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D142942
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D143853
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D143514
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D142247
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D142635
|
| |
|
| |
|
|
|
|
|
|
| |
r=nss-reviewers,nkulatova
Differential Revision: https://phabricator.services.mozilla.com/D142481
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D142434
|
| |
|
| |
|
|
|
|
|
|
| |
Depends on D141920
Differential Revision: https://phabricator.services.mozilla.com/D141921
|
|
|
|
|
|
| |
Depends on D141919
Differential Revision: https://phabricator.services.mozilla.com/D141920
|
|
|
|
|
|
| |
certdata.txt. r=KathleenWilson
Differential Revision: https://phabricator.services.mozilla.com/D141919
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to mozilla::pkix for certificates signed with
RSA-PSS using one of the following parameters permitted by the CA/Browser
Forum Baseline Requirements 1.8.1:
* SHA-256, MGF-1 with SHA-256, and a salt length of 32 bytes
* SHA-384, MGF-1 with SHA-384, and a salt length of 48 bytes
* SHA-512, MGF-1 with SHA-512, and a salt length of 64 bytes
Differential Revision: https://phabricator.services.mozilla.com/D141539
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `stateEnd->parent != state` check was added in Bug 95458 to avoid a crash
in `sec_asn1d_free_child`. The diagnosis in Bug 95458 is incorrect---the crash
was actually due to a `PORT_Assert(0)` that was meant to highlight a memory
leak when `SEC_ASN1DecoderStart` was called with `their_pool==NULL`. The
offending assertion was removed in Bug 95311, which makes the `stateEnd` check
obsolete. In Bug 1753535 it was observed that the `stateEnd` check could read
from a poisoned region of an arena when the decoder was used in a streaming
mode. This read-after-poison could lead to an arena memory leak, although this
is mitigated by the fact that the read-after-poison is on an error-handling path
where the caller typically frees the entire arena.
Differential Revision: https://phabricator.services.mozilla.com/D140861
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D139547
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D139866
|
|
|
|
| |
Caused Windows gyp build failures for cmd/mpitests
|
|
|
|
|
|
| |
r=nss-reviewers,jschanck
Differential Revision: https://phabricator.services.mozilla.com/D139785
|
|
|
|
|
|
| |
r=nss-reviewers,jschanck
Differential Revision: https://phabricator.services.mozilla.com/D139790
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D139866
|
|
|
|
|
|
| |
Depends on D141764
Differential Revision: https://phabricator.services.mozilla.com/D141765
|
|
|
|
|
|
| |
Depends on D131425
Differential Revision: https://phabricator.services.mozilla.com/D141764
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D131425
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D140984
|