|
7 | 7 | https://github.com/openssl/openssl/commits/ and pick the appropriate
|
8 | 8 | release branch.
|
9 | 9 |
|
| 10 | + Changes between 1.1.1k and 1.1.1l [24 Aug 2021] |
| 11 | + |
| 12 | + *) Fixed an SM2 Decryption Buffer Overflow. |
| 13 | + |
| 14 | + In order to decrypt SM2 encrypted data an application is expected to call the |
| 15 | + API function EVP_PKEY_decrypt(). Typically an application will call this |
| 16 | + function twice. The first time, on entry, the "out" parameter can be NULL and, |
| 17 | + on exit, the "outlen" parameter is populated with the buffer size required to |
| 18 | + hold the decrypted plaintext. The application can then allocate a sufficiently |
| 19 | + sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL |
| 20 | + value for the "out" parameter. |
| 21 | + |
| 22 | + A bug in the implementation of the SM2 decryption code means that the |
| 23 | + calculation of the buffer size required to hold the plaintext returned by the |
| 24 | + first call to EVP_PKEY_decrypt() can be smaller than the actual size required by |
| 25 | + the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is |
| 26 | + called by the application a second time with a buffer that is too small. |
| 27 | + |
| 28 | + A malicious attacker who is able present SM2 content for decryption to an |
| 29 | + application could cause attacker chosen data to overflow the buffer by up to a |
| 30 | + maximum of 62 bytes altering the contents of other data held after the |
| 31 | + buffer, possibly changing application behaviour or causing the application to |
| 32 | + crash. The location of the buffer is application dependent but is typically |
| 33 | + heap allocated. |
| 34 | + (CVE-2021-3711) |
| 35 | + [Matt Caswell] |
| 36 | + |
| 37 | + *) Fixed various read buffer overruns processing ASN.1 strings |
| 38 | + |
| 39 | + ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING |
| 40 | + structure which contains a buffer holding the string data and a field holding |
| 41 | + the buffer length. This contrasts with normal C strings which are repesented as |
| 42 | + a buffer for the string data which is terminated with a NUL (0) byte. |
| 43 | + |
| 44 | + Although not a strict requirement, ASN.1 strings that are parsed using OpenSSL's |
| 45 | + own "d2i" functions (and other similar parsing functions) as well as any string |
| 46 | + whose value has been set with the ASN1_STRING_set() function will additionally |
| 47 | + NUL terminate the byte array in the ASN1_STRING structure. |
| 48 | + |
| 49 | + However, it is possible for applications to directly construct valid ASN1_STRING |
| 50 | + structures which do not NUL terminate the byte array by directly setting the |
| 51 | + "data" and "length" fields in the ASN1_STRING array. This can also happen by |
| 52 | + using the ASN1_STRING_set0() function. |
| 53 | + |
| 54 | + Numerous OpenSSL functions that print ASN.1 data have been found to assume that |
| 55 | + the ASN1_STRING byte array will be NUL terminated, even though this is not |
| 56 | + guaranteed for strings that have been directly constructed. Where an application |
| 57 | + requests an ASN.1 structure to be printed, and where that ASN.1 structure |
| 58 | + contains ASN1_STRINGs that have been directly constructed by the application |
| 59 | + without NUL terminating the "data" field, then a read buffer overrun can occur. |
| 60 | + |
| 61 | + The same thing can also occur during name constraints processing of certificates |
| 62 | + (for example if a certificate has been directly constructed by the application |
| 63 | + instead of loading it via the OpenSSL parsing functions, and the certificate |
| 64 | + contains non NUL terminated ASN1_STRING structures). It can also occur in the |
| 65 | + X509_get1_email(), X509_REQ_get1_email() and X509_get1_ocsp() functions. |
| 66 | + |
| 67 | + If a malicious actor can cause an application to directly construct an |
| 68 | + ASN1_STRING and then process it through one of the affected OpenSSL functions |
| 69 | + then this issue could be hit. This might result in a crash (causing a Denial of |
| 70 | + Service attack). It could also result in the disclosure of private memory |
| 71 | + contents (such as private keys, or sensitive plaintext). |
| 72 | + (CVE-2021-3712) |
| 73 | + [Matt Caswell] |
| 74 | + |
10 | 75 | Changes between 1.1.1j and 1.1.1k [25 Mar 2021]
|
11 | 76 |
|
12 | 77 | *) Fixed a problem with verifying a certificate chain when using the
|
|
0 commit comments