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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | OpenSC | opensc-0.23.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | opensc | 0.23.0-0.3 | — |
| Debian 13 | opensc | 0.23.0-0.3 | — |
| Debian 12 | opensc | 0.23.0-0.3 | — |
| Debian 11 | opensc | 0.21.0-1+deb11u1 | DLA-4004-1 |
| Debian 10 | opensc | 0.19.0-1+deb10u2 | DLA-3463-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | opensc | 0.25.0~rc1-1ubuntu0.1~esm1 | USN-7346-1 |
| Ubuntu Pro 22.04 LTS | opensc | 0.22.0-1ubuntu2+esm1 | USN-7346-1 |
| Ubuntu Pro 20.04 LTS | opensc | 0.20.0-3ubuntu0.1~esm4 | USN-7346-3, USN-7346-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | opensc | 0.17.0-3ubuntu0.1~esm2 | USN-7346-1 |
| Ubuntu Pro 16.04 LTS | opensc | 0.15.0-1ubuntu1+esm2 | USN-7346-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | opensc | 0.23.0-2.el9 | RHSA-2023:6587 |
| RHEL 8 | opensc | 0.20.0-6.el8 | RHSA-2023:7160 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | opensc | 0.23.0-2.el9 | ALSA-2023:6587 |
| AlmaLinux 8 | opensc | 0.20.0-6.el8 | ALSA-2023:7160 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
| SLES 15 SP4 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
| SLES 12 SP5 | opensc | 0.13.0-3.22.1 | SUSE-SU-2023:2466-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 12 SP5 | opensc | 0.13.0-3.22.1 | SUSE-SU-2023:2466-1 |
| SLE Real Time 15 SP3 | opensc | 0.19.0-150100.3.22.1 | SUSE-SU-2023:2508-1 |
| SLE Micro 5.4 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
| SLE Micro 5.3 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
| SLE Micro 5.2 | opensc | 0.19.0-150100.3.22.1 | SUSE-SU-2023:2508-1 |
| SLE Micro 5.1 | opensc | 0.19.0-150100.3.22.1 | SUSE-SU-2023:2508-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | opensc | 0.23.0-2.1 | openSUSE-SU-2024:12968-1 |
| openSUSE Leap 15.5 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
| openSUSE Leap 15.4 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.3 | opensc | 0.22.0-150400.3.3.1 | SUSE-SU-2023:2516-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | opensc | 0.23.0-3.amzn2023.0.1 | ALAS2023-2023-207 |
| Amazon Linux 2 | opensc | 0.19.0-5.amzn2 | ALAS2-2023-2102 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | opensc | 0.22.0-3 | — |
| Azure Linux 2 (CBL-Mariner) | opensc | 0.22.0-3 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | opensc | 0.23.0-2.el9 | ELSA-2023-6587 |
| Oracle Linux 8 | opensc | 0.20.0-6.el8 | ELSA-2023-7160 |
Advisories 17
- ALSA-2023:6587 Low: opensc security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2023:7160 Low: opensc security and bug fix update AlmaLinux Security Advisories · Oct 29, 2026
- USN-7346-1 opensc vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-7346-3 opensc vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- RHSA-2023:7160 Red Hat Security Advisory: opensc security and bug fix update Red Hat Security Advisories (RHSA) · Mar 18, 2026
- RHSA-2023:6587 Red Hat Security Advisory: opensc security update Red Hat Security Advisories (RHSA) · Mar 18, 2026
- DLA-3463-1 opensc - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-4004-1 opensc - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2023:2508-1 Security update for opensc SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:12968-1 opensc-0.23.0-2.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2023-1324 OpenSC: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Nov 6, 2025
- SUSE-SU-2023:2466-1 Security update for opensc SUSE / openSUSE Security Updates · May 2, 2025
- SUSE-SU-2023:2516-1 Security update for opensc SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2023-7160 Low: opensc security and bug fix update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Nov 17, 2023
- ELSA-2023-6587 Low: opensc security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Nov 11, 2023
- ALAS2-2023-2102 Moderate: opensc security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Jun 29, 2023
- ALAS2023-2023-207 Moderate: opensc security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jun 12, 2023
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