Bug 2309289 (CVE-2024-45620)

Summary: CVE-2024-45620 libopensc: Incorrect handling of the length of buffers or files in pkcs15init
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2024-09-02 18:36:46 UTC
The reported issues are part of the card enrollment process using the
pkcs15-init tool.
The attack requires a crafted USB device or smart card that would present
the system with specially crafted responses to the APDUs, so they are
considered high complexity and low severity.

When buffers are partially filled with data, uninitialized parts of the
buffer can be incorrectly accessed.
The uninitialized variables were reflected in the following functions:

- starcos_write_pukey
- iasecc_sdo_parse
- setcos_generate_key
- sc_hsm_determine_free_id

Originally reported by Matteo Marini (Sapienza University of Rome)