Vulnerability · Published Jun 1, 2023 · Assigned by redhat
CVE-2023-2977
High 7.1
In plain English
A high-severity memory corruption in OpenSC. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for 2 tags, where remaining length is wrongly caculated due to moved starting pointer. This leads to possible heap-based buffer oob read. In cases where ASAN is enabled while compiling this causes a crash. Further info leak or more damage is possible.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | opensc | 0.20.0-6.el8 | ALSA-2023:7160 |
| AlmaLinux:9 | opensc | 0.23.0-2.el9 | ALSA-2023:6587 |
| Debian:12 | opensc | 0.23.0-0.3 | DEBIAN-CVE-2023-2977 |
| Debian:13 | opensc | 0.23.0-0.3 | DEBIAN-CVE-2023-2977 |
| Debian:14 | opensc | 0.23.0-0.3 | DEBIAN-CVE-2023-2977 |
Affected products (as reported)
Weakness: CWE-119 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
References
- https://access.redhat.com/security/cve/CVE-2023-2977
- https://bugzilla.redhat.com/show_bug.cgi?id=2211088
- https://github.com/OpenSC/OpenSC/issues/2785
- https://github.com/OpenSC/OpenSC/pull/2787
- [debian-lts-announce] 20230621 [SECURITY] [DLA 3463-1] opensc security update mailing-list
- FEDORA-2023-29530cc60b vendor-advisory
- FEDORA-2023-2afb831742 vendor-advisory
- https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html