CVE-2021-3711

Source
https://cve.org/CVERecord?id=CVE-2021-3711
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-3711.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-3711
Aliases
Downstream
Related
Published
2021-08-24T15:15:09.133Z
Modified
2026-04-16T04:38:20.594061637Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

In order to decrypt SM2 encrypted data an application is expected to call the API function EVPPKEYdecrypt(). 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 EVPPKEYdecrypt() 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 EVPPKEYdecrypt() can be smaller than the actual size required by the second call. This can lead to a buffer overflow when EVPPKEYdecrypt() 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).

References

Affected packages

Git / github.com/mysql/mysql-server

Affected ranges

Type
GIT
Repo
https://github.com/mysql/mysql-server
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "8.4"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "9.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "8.4.5"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "8.4"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "9.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "a9.4"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "8.0.27"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "8.0.25"
        },
        {
            "introduced": "5.7.0"
        },
        {
            "last_affected": "5.7.35"
        },
        {
            "introduced": "8.0.0"
        },
        {
            "last_affected": "8.0.26"
        }
    ]
}
Type
GIT
Repo
https://github.com/openssl/openssl
Events
Introduced
Fixed
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "1.1.1"
        },
        {
            "fixed": "1.1.1l"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "3.2.0"
        },
        {
            "introduced": "0"
        },
        {
            "last_affected": "3.3.0"
        }
    ]
}

Affected versions

Other
BEFORE_engine
OpenSSL_0_9_1c
OpenSSL_0_9_2b
OpenSSL_0_9_3
OpenSSL_0_9_3a
OpenSSL_0_9_3beta2
OpenSSL_0_9_4
OpenSSL_0_9_5a
OpenSSL_0_9_5a-beta1
OpenSSL_0_9_5a-beta2
OpenSSL_0_9_5beta1
OpenSSL_0_9_5beta2
OpenSSL_0_9_6-beta3
OpenSSL_1_1_0-pre1
OpenSSL_1_1_0-pre2
OpenSSL_1_1_0-pre3
OpenSSL_1_1_0-pre4
OpenSSL_1_1_0-pre5
OpenSSL_1_1_0-pre6
OpenSSL_1_1_1
OpenSSL_1_1_1-pre1
OpenSSL_1_1_1-pre2
OpenSSL_1_1_1-pre3
OpenSSL_1_1_1-pre4
OpenSSL_1_1_1-pre5
OpenSSL_1_1_1-pre6
OpenSSL_1_1_1-pre7
OpenSSL_1_1_1-pre8
OpenSSL_1_1_1-pre9
OpenSSL_1_1_1a
OpenSSL_1_1_1b
OpenSSL_1_1_1c
OpenSSL_1_1_1d
OpenSSL_1_1_1e
OpenSSL_1_1_1f
OpenSSL_1_1_1g
OpenSSL_1_1_1h
OpenSSL_1_1_1i
OpenSSL_1_1_1j
OpenSSL_1_1_1k
OpenSSL_1_1_1l
OpenSSL_1_1_1m
OpenSSL_1_1_1n
OpenSSL_1_1_1o
OpenSSL_1_1_1p
OpenSSL_1_1_1q
OpenSSL_1_1_1r
OpenSSL_1_1_1s
OpenSSL_1_1_1t
OpenSSL_1_1_1u
OpenSSL_1_1_1v
master-post-auto-reformat
master-post-reformat
master-pre-auto-reformat
master-pre-reformat
mysql-3.*
mysql-3.23.22-beta
mysql-3.23.28-gamma
mysql-3.23.30-gamma
mysql-3.23.31
mysql-3.23.32
mysql-3.23.33
mysql-3.23.36
mysql-4.*
mysql-4.0.2
mysql-4.0.4
mysql-5.*
mysql-5.1.4
mysql-5.7.31
mysql-5.7.32
mysql-5.7.35
mysql-8.*
mysql-8.0.24
mysql-8.0.25
mysql-8.0.26
mysql-8.0.27
mysql-8.4.0
mysql-8.4.1
mysql-8.4.3
mysql-8.4.4
mysql-8.4.5
mysql-9.*
mysql-9.0.0
mysql-9.0.0-release
mysql-9.4.0
mysql-cluster-8.*
mysql-cluster-8.0.24
mysql-cluster-8.0.25
mysql-cluster-8.0.26
mysql-cluster-8.0.27
mysql-cluster-8.4.0
mysql-cluster-8.4.1
mysql-cluster-8.4.3
mysql-cluster-8.4.4
mysql-cluster-8.4.5
mysql-cluster-9.*
mysql-cluster-9.0.0
mysql-cluster-9.4.0
openssl-3.*
openssl-3.0.0-alpha1
openssl-3.0.0-alpha10
openssl-3.0.0-alpha11
openssl-3.0.0-alpha12
openssl-3.0.0-alpha13
openssl-3.0.0-alpha14
openssl-3.0.0-alpha15
openssl-3.0.0-alpha16
openssl-3.0.0-alpha17
openssl-3.0.0-alpha2
openssl-3.0.0-alpha3
openssl-3.0.0-alpha4
openssl-3.0.0-alpha5
openssl-3.0.0-alpha6
openssl-3.0.0-alpha7
openssl-3.0.0-alpha8
openssl-3.0.0-alpha9
openssl-3.0.0-beta1
openssl-3.0.0-beta2
openssl-3.2.0
openssl-3.2.0-alpha1
openssl-3.2.0-alpha2
openssl-3.2.0-beta1
openssl-3.3.0
openssl-3.3.0-alpha1
openssl-3.3.0-beta1

Database specific

unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "10.0"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "11.0"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "11.0"
            },
            {
                "last_affected": "11.50.2"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "1.7.0"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "1.15.0"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "8.2.5"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "fixed": "11.1.2.4.47"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "21.1"
            },
            {
                "fixed": "21.3"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "6.2.1.1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "6.3.1.1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "fixed": "9.2.6.3"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "8.57"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "8.58"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "8.59"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "8.8"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13.1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "5.16.0"
            },
            {
                "last_affected": "5.19.1"
            }
        ]
    }
]
vanir_signatures_modified
"2026-04-11T16:26:03Z"
vanir_signatures
[
    {
        "signature_type": "Line",
        "digest": {
            "line_hashes": [
                "28170854778703993674264004058177114599",
                "73132526844288570625317440636111911761",
                "177405411499435185068645597737938634778",
                "224809958623850711330610094965797758930",
                "295554444428855106393106961197201359586"
            ],
            "threshold": 0.9
        },
        "signature_version": "v1",
        "id": "CVE-2021-3711-c377fa22",
        "target": {
            "file": "include/openssl/opensslv.h"
        },
        "deprecated": false,
        "source": "https://github.com/openssl/openssl/commit/e04bd3433fd84e1861bf258ea37928d9845e6a86"
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-3711.json"