CVE-2024-45620
Low · 3.9CVSS
3.9
EPSS
0.3%
Published
Sep 3, 2024
CISA due date
—
Cloudanix analysis
Smart-card software can mishandle data from a specially made device plugged into a computer, and updating the software removes the problem.
- Exploitation
- Physical Access
- Attacker needs
- Physical Access
- Complexity
- High
- Impact
- Data Exposure
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The pkcs15-init tool in OpenSC incorrectly accesses initialized portions of buffers when processing partially filled data returned from APDU responses on a crafted USB device or smart card, resulting in memory corruption.
Why it matters to the business
Systems that perform smart card or USB token initialization face limited risk of memory corruption or instability only when an attacker has physical access to connect a malicious device; the low severity and physical-access requirement keep operational disruption minimal for most environments.
How an attack unfolds
An attacker crafts a USB device or smart card that supplies specially formed APDU responses causing partial buffer fills; when the pkcs15-init tool processes these responses it accesses uninitialized or incorrectly bounded memory regions, enabling local memory corruption.
How to fix it
Upgrade OpenSC to the version containing commit fe857cc4c68da4873071f168c9aaf9860040ff4e or later; rebuild and redeploy any affected packages that embed the vulnerable pkcs15-init binary.
How to confirm the fix worked
Confirm the installed OpenSC binary or source contains commit fe857cc4c68da4873071f168c9aaf9860040ff4e; test initialization flows with both benign and edge-case APDU responses to verify buffer handling behaves correctly.
Typical attack path
- Obtain physical access to a system running pkcs15-init
- Connect a crafted USB device or smart card
- Invoke the pkcs15-init tool against the device
- Trigger buffer handling that leads to memory corruption
How to detect it
Inspect system and application logs for pkcs15-init invocations, unexpected crashes, or memory-related errors that coincide with insertion of external USB or smart-card devices.
What your security team should do
- Apply the fixed OpenSC commit immediately on all systems that use pkcs15-init
- Enforce physical-access controls around workstations that initialize smart cards or tokens
- Remove or disable pkcs15-init where smart-card initialization is not required
The record
A vulnerability was found in the pkcs15-init tool in OpenSC. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs. When buffers are partially filled with data, initialized parts of the buffer can be incorrectly accessed.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | opensc | 0 | No fix |
| Debian:11 | opensc | 0 | 0.21.0-1+deb11u1 |
| Debian:12 | opensc | 0 | No fix |
| Debian:13 | opensc | 0 | No fix |
| Mageia:9 | opensc | 0 | 0.25.0-1.1.mga9 |
| SUSE:Linux Enterprise Micro 5.1 | opensc | 0 | 0.19.0-150100.3.31.1 |
| SUSE:Linux Enterprise Micro 5.2 | opensc | 0 | 0.19.0-150100.3.31.1 |
| SUSE:Linux Enterprise Micro 5.3 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Micro 5.4 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Micro 5.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | opensc | 0 | 0.22.0-150600.11.3.1 |
| SUSE:Linux Enterprise Server 12 SP5 | opensc | 0 | 0.13.0-3.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | opensc | 0 | 0.13.0-3.31.1 |
| Ubuntu:20.04:LTS | opensc | 0 | No fix |
| Ubuntu:22.04:LTS | opensc | 0 | No fix |
| Ubuntu:24.04:LTS | opensc | 0 | No fix |
| Ubuntu:24.10 | opensc | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | opensc | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | opensc | 0 | 0.15.0-1ubuntu1+esm2 |
| Ubuntu:Pro:18.04:LTS | opensc | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | opensc | 0 | 0.17.0-3ubuntu0.1~esm2 |
| Ubuntu:Pro:20.04:LTS | opensc | 0 | 0.20.0-3ubuntu0.1~esm4 |
| Ubuntu:Pro:22.04:LTS | opensc | 0 | 0.22.0-1ubuntu2+esm1 |
| Ubuntu:Pro:24.04:LTS | opensc | 0 | 0.25.0~rc1-1ubuntu0.1~esm1 |
| openSUSE:Leap 15.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| openSUSE:Leap 15.6 | opensc | 0 | 0.22.0-150600.11.3.1 |
| openSUSE:Leap Micro 5.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| openSUSE:Tumbleweed | opensc | 0 | 0.25.1-2.1 |
Related vulnerabilities
- CVE-2024-8443 A heap-based buffer overflow vulnerability was found in the libopensc OpenPGP driver. Also affects opensc
- CVE-2024-45619 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2024-45617 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2024-45618 A vulnerability was found in pkcs15-init in OpenSC. Also affects opensc
- CVE-2024-45616 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2024-45615 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2026-10275 A flaw has been found in OpenSC up to 0.26.1. Also affects opensc
- CVE-2026-40528 OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun… Also affects opensc