First published: Tue May 30 2023(Updated: )
A vulnerability was found in OpenSC. This issue causes a buffer overrun in the pkcs15 cardos_have_verifyrc_package. This flaw allows an attacker to supply a smart card package with a malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for two tags, where the remaining length is wrongly calculated due to a moved starting pointer, leading to a possible heap-based buffer out-of-bounds read. In cases where ASN is enabled while compiling, this problem causes a crash, and further information leaks or more damage is likely.
Credit: secalert@redhat.com secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
Opensc Project Opensc | =0.23.0 | |
Redhat Enterprise Linux | =8.0 | |
Redhat Enterprise Linux | =9.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID for this OpenSC vulnerability is CVE-2023-2977.
CVE-2023-2977 has a severity rating of 7.1 (high).
The buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package allows an attacker to supply a smart card package with a malformed ASN1 context, potentially leading to arbitrary code execution or a denial of service.
OpenSC version 0.23.0 is affected by CVE-2023-2977.
To fix the CVE-2023-2977 vulnerability in OpenSC, update to a version that includes the fix provided in the OpenSC GitHub repository pull request.