You can now sign in with a passkey, no password needed, or protect your account with a second factor. Learn more
OpenSSL: SM2 Decryption Buffer Overflow
Download as CSAF file (VEX, JSON)Machine-readable version of this assessment in the OASIS CSAF 2.0 standard, for example for your vulnerability scanner. You may pass the file on.
In order to decrypt SM2 encrypted data an application is expected to call the API function EVP_PKEY_decrypt(). Typically an application will call this function twice. The first time, on entry, the "out" parameter can be NULL and, on exit, the "outlen" parameter is populated with the buffer size required to hold the decrypted plaintext. The application can then allocate a sufficiently sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL value for the "out" parameter. A bug in the implementation of the SM2 decryption code means that the calculation of the buffer size required to hold the plaintext returned by the first call to EVP_PKEY_decrypt() can be smaller than the actual size required by the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is called by the application a second time with a buffer that is too small. A malicious attacker who is able present SM2 content for decryption to an application could cause attacker chosen data to overflow the buffer by up to a maximum of 62 bytes altering the contents of other data held after the buffer, possibly changing application behaviour or causing the application to crash. The location of the buffer is application dependent but is typically heap allocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).
The newest version of each supported line. Older versions are under “All versions”.
| Version | Status | Fixed from |
|---|---|---|
| EventReporter 26.11Current | Not affected | – |
| EventReporter 19.4aExtended maintenance | Not affected | – |
| MonitorWare Agent 26.11Current | Not affected | – |
| MonitorWare Agent 15.4aExtended maintenance | Not affected | – |
| rsyslog Windows Agent 26.11Current | Not affected | – |
| rsyslog Windows Agent 8.4aExtended maintenance | Not affected | – |
| WinSyslog 26.11Current | Not affected | – |
The vulnerable code is not included.
26.07 and later ship OpenSSL 3.5.6 or 3.5.9; OpenSSL does not list either as affected.
The vulnerable code is not included.
Releases before 19.4a ship OpenSSL 3.2.1, 19.4a ships OpenSSL 3.5.9; OpenSSL does not list either as affected.
Fixed from 18.3
Fixed by OpenSSL 1.1.1g → 1.1.1q
Releases before 18.3 ship OpenSSL 1.1.1g, which is affected; fixed from 18.3, which ships OpenSSL 1.1.1q. Line 18 is end of life; please update to a supported version (19.4a or 26.11).
| WinSyslog 18.4aExtended maintenance |
|---|
| Not affected |
| – |
Checked: Bundled OpenSSL per himalaya tag: 1.1.1g before 18.3, 1.1.1q from 18.3
The vulnerable code is not included.
This line ships OpenSSL 1.0.2k (before 17.2) and 1.0.2u (from 17.2); OpenSSL does not list either as affected.
Checked: Bundled OpenSSL per himalaya tag: 1.0.2k before 17.2, 1.0.2u from 17.2
The vulnerable code is not included.
26.07 and later ship OpenSSL 3.5.6 or 3.5.9; OpenSSL does not list either as affected.
The vulnerable code is not included.
Releases before 15.4a ship OpenSSL 3.2.1, 15.4a ships OpenSSL 3.5.9; OpenSSL does not list either as affected.
Fixed from 14.3
Fixed by OpenSSL 1.1.1g → 1.1.1q
Releases before 14.3 ship OpenSSL 1.1.1g, which is affected; fixed from 14.3, which ships OpenSSL 1.1.1q. Line 14 is end of life; please update to a supported version (15.4a or 26.11).
Checked: Bundled OpenSSL per himalaya tag: 1.1.1g before 14.3, 1.1.1q from 14.3
The vulnerable code is not included.
This line ships OpenSSL 1.0.2k (before 13.2) and 1.0.2u (from 13.2); OpenSSL does not list either as affected.
Checked: Bundled OpenSSL per himalaya tag: 1.0.2k before 13.2, 1.0.2u from 13.2
The vulnerable code is not included.
26.07 and later ship OpenSSL 3.5.6 or 3.5.9; OpenSSL does not list either as affected.
The vulnerable code is not included.
Releases before 8.4a ship OpenSSL 3.2.1, 8.4a ships OpenSSL 3.5.9; OpenSSL does not list either as affected.
Fixed from 7.3
Fixed by OpenSSL 1.1.1g → 1.1.1q
Releases before 7.3 ship OpenSSL 1.1.1g, which is affected; fixed from 7.3, which ships OpenSSL 1.1.1q. Line 7 is end of life; please update to a supported version (8.4a or 26.11).
Checked: Bundled OpenSSL per himalaya tag: 1.1.1g before 7.3, 1.1.1q from 7.3
The vulnerable code is not included.
This line ships OpenSSL 1.0.2k (before 6.2) and 1.0.2u (from 6.2); OpenSSL does not list either as affected.
Checked: Bundled OpenSSL per himalaya tag: 1.0.2k before 6.2, 1.0.2u from 6.2
The vulnerable code is not included.
26.07 and later ship OpenSSL 3.5.6 or 3.5.9; OpenSSL does not list either as affected.
The vulnerable code is not included.
Releases before 18.4a ship OpenSSL 3.2.1, 18.4a ships OpenSSL 3.5.9; OpenSSL does not list either as affected.
Fixed from 17.3
Releases before 17.3 ship OpenSSL 1.1.1g, which is affected; fixed from 17.3, which ships OpenSSL 1.1.1q. Line 17 is end of life; please update to a supported version (18.4a or 26.11).
Checked: Bundled OpenSSL per himalaya tag: 1.1.1g before 17.3, 1.1.1q from 17.3
The vulnerable code is not included.
This line ships OpenSSL 1.0.2k (before 16.2) and 1.0.2u (from 16.2); OpenSSL does not list either as affected.
Checked: Bundled OpenSSL per himalaya tag: 1.0.2k before 16.2, 1.0.2u from 16.2
Products and versions not listed here have not been checked.