CVE-2021-3711

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).
Classic Buffer Overflow
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTNIST
9.8 CRITICAL
NETWORK
LOW
NONE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
opensslCNA
---
---
CVEADP
---
---
Base Score
CVSS 3.x
EPSS Score
Percentile: 84%
VendorProductVersion
opensslopenssl
1.1.1 ≤
𝑥
< 1.1.1l
debiandebian_linux
10.0
debiandebian_linux
11.0
netappactive_iq_unified_manager
-
netappactive_iq_unified_manager
-
netappclustered_data_ontap
-
netappclustered_data_ontap_antivirus_connector
-
netappe-series_santricity_os_controller
11.0 ≤
𝑥
≤ 11.50.2
netapphci_management_node
-
netappmanageability_software_development_kit
-
netapponcommand_insight
-
netapponcommand_workflow_automation
-
netappsantricity_smi-s_provider
-
netappsnapcenter
-
netappsolidfire
-
netappstorage_encryption
-
oraclecommunications_cloud_native_core_security_edge_protection_proxy
1.7.0
oraclecommunications_cloud_native_core_unified_data_repository
1.15.0
oraclecommunications_session_border_controller
8.4
oraclecommunications_session_border_controller
9.0
oraclecommunications_unified_session_manager
8.2.5
oraclecommunications_unified_session_manager
8.4.5
oracleenterprise_communications_broker
3.2.0
oracleenterprise_communications_broker
3.3.0
oracleenterprise_session_border_controller
8.4
oracleenterprise_session_border_controller
9.0
oracleessbase
𝑥
< 11.1.2.4.47
oracleessbase
21.1 ≤
𝑥
< 21.3
oraclehealth_sciences_inform_publisher
6.2.1.1
oraclehealth_sciences_inform_publisher
6.3.1.1
oraclejd_edwards_enterpriseone_tools
𝑥
< 9.2.6.3
oraclemysql_connectors
𝑥
≤ 8.0.27
oraclemysql_enterprise_monitor
𝑥
≤ 8.0.25
oraclemysql_server
5.7.0 ≤
𝑥
≤ 5.7.35
oraclemysql_server
8.0.0 ≤
𝑥
≤ 8.0.26
oraclepeoplesoft_enterprise_peopletools
8.57
oraclepeoplesoft_enterprise_peopletools
8.58
oraclepeoplesoft_enterprise_peopletools
8.59
oraclezfs_storage_appliance_kit
8.8
tenablenessus_network_monitor
𝑥
≤ 5.13.1
tenabletenable.sc
5.16.0 ≤
𝑥
≤ 5.19.1
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
openssl
bullseye
1.1.1w-0+deb11u1
fixed
stretch
not-affected
bullseye (security)
1.1.1w-0+deb11u2
fixed
bookworm
3.0.14-1~deb12u1
fixed
bookworm (security)
3.0.14-1~deb12u2
fixed
sid
3.3.2-2
fixed
trixie
3.3.2-2
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
edk2
noble
not-affected
mantic
not-affected
lunar
not-affected
kinetic
not-affected
jammy
not-affected
impish
not-affected
hirsute
not-affected
focal
not-affected
bionic
not-affected
xenial
not-affected
trusty
dne
nodejs
noble
not-affected
mantic
not-affected
lunar
not-affected
kinetic
not-affected
jammy
not-affected
impish
not-affected
hirsute
not-affected
focal
not-affected
bionic
not-affected
xenial
not-affected
trusty
not-affected
openssl
noble
Fixed 1.1.1l-1ubuntu1
released
mantic
Fixed 1.1.1l-1ubuntu1
released
lunar
Fixed 1.1.1l-1ubuntu1
released
kinetic
Fixed 1.1.1l-1ubuntu1
released
jammy
Fixed 1.1.1l-1ubuntu1
released
impish
Fixed 1.1.1l-1ubuntu1
released
hirsute
Fixed 1.1.1j-1ubuntu3.5
released
focal
Fixed 1.1.1f-1ubuntu2.8
released
bionic
Fixed 1.1.1-1ubuntu2.1~18.04.13
released
xenial
not-affected
trusty
not-affected
openssl1.0
noble
dne
mantic
dne
lunar
dne
kinetic
dne
jammy
dne
impish
dne
hirsute
dne
focal
dne
bionic
not-affected
xenial
dne
trusty
dne
References