Vulnerability · Published Nov 6, 2023 · Assigned by redhat
CVE-2023-40661Opensc: multiple memory issues with pkcs15-init (enrollment tool)
Medium 5.4
In plain English
A medium-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 1.3% (higher than 71% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Several memory vulnerabilities were identified within the OpenSC packages, particularly in the card enrollment process using pkcs15-init when a user or administrator enrolls cards. To take advantage of these flaws, an attacker must have physical access to the computer system and employ a custom-crafted USB device or smart card to manipulate responses to APDUs. This manipulation can potentially allow compromise key generation, certificate loading, and other card management operations during enrollment.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | opensc | 0.20.0-7.el8_9 | ALSA-2023:7876 |
| AlmaLinux:9 | opensc | 0.23.0-3.el9_3 | ALSA-2023:7879 |
| Alpine:v3.20 | opensc | 0.24.0-r0 | ALPINE-CVE-2023-40661 |
| Alpine:v3.21 | opensc | 0.24.0-r0 | ALPINE-CVE-2023-40661 |
| Alpine:v3.22 | opensc | 0.24.0-r0 | ALPINE-CVE-2023-40661 |
| Alpine:v3.23 | opensc | 0.24.0-r0 | ALPINE-CVE-2023-40661 |
| Alpine:v3.24 | opensc | 0.24.0-r0 | ALPINE-CVE-2023-40661 |
| Debian:12 | opensc | 0.23.0-0.3+deb12u1 | DEBIAN-CVE-2023-40661 |
| Debian:13 | opensc | 0.23.0-2 | DEBIAN-CVE-2023-40661 |
| Debian:14 | opensc | 0.23.0-2 | DEBIAN-CVE-2023-40661 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| OpenSC | 0 – before 0.24.0 | |
| Red Hat | Red Hat Enterprise Linux 8 | see references |
| Red Hat | Red Hat Enterprise Linux 9 | see references |
| Red Hat | Red Hat Enterprise Linux 7 | see references |
Weakness: CWE-119 · Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
References
- RHSA-2023:7876 vendor-advisory, x_refsource_REDHAT
- RHSA-2023:7879 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2023-40661 vdb-entry, x_refsource_REDHAT
- RHBZ#2240913 issue-tracking, x_refsource_REDHAT
- https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651
- https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1
- https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories
- http://www.openwall.com/lists/oss-security/2023/12/13/3 x_transferred
- https://lists.debian.org/debian-lts-announce/2023/11/msg00024.html x_transferred
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/ x_transferred
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/ x_transferred
- https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html