CVE-2024-45618
Low · 3.9CVSS
3.9
EPSS
0.3%
Published
Sep 3, 2024
CISA due date
—
Cloudanix analysis
Smart card software can behave unexpectedly if someone with physical access uses a specially made card, though exploiting it is difficult and requires direct contact with the machine.
- Exploitation
- Physical Access
- Attacker needs
- Physical Access
- Complexity
- High
- Impact
- Other
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Missing return value checks in pkcs15-init cause use of uninitialized variables when processing crafted APDU responses from a USB device or smart card, resulting in memory corruption.
Why it matters to the business
Low-risk physical attack vector allows limited unauthorized access or data manipulation on systems using OpenSC for smart card operations; physical access requirement and high complexity limit real-world exposure.
How an attack unfolds
An attacker with physical access presents a malicious smart card or USB device that returns specially crafted APDU responses; pkcs15-init fails to validate function returns, leading to operations on uninitialized variables and memory corruption.
How to fix it
Upgrade opensc/opensc to commit fe857cc4c68da4873071f168c9aaf9860040ff4e or later; rebuild and redeploy affected packages.
How to confirm the fix worked
Confirm the installed OpenSC binary or library reports the fixed commit hash; perform functional testing with known-good smart cards to ensure APDU handling succeeds without crashes or unexpected behavior.
Typical attack path
- Obtain physical access to the target system
- Insert a crafted USB device or smart card
- Trigger pkcs15-init processing of APDU responses
- Exploit uninitialized variable use for limited corruption effects
How to detect it
Review system and application logs for pkcs15-init crashes, segmentation faults, or uninitialized variable warnings during card initialization; inspect for unexpected process terminations involving OpenSC components.
- pkcs15-init
- segmentation fault.*opensc
- uninitialized variable.*APDU
What your security team should do
- Prioritize upgrade of OpenSC in all environments handling smart cards
- Restrict physical access to systems with card readers
- Monitor for OpenSC-related crashes in system logs
The record
A vulnerability was found in pkcs15-init 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. Insufficient or missing checking of return values of functions leads to unexpected work with variables that have not been initialized.
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-45620 A vulnerability was found in the pkcs15-init tool in OpenSC. 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-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