Out-of-bounds read in OpenSC - CVE-2023-2977

 

Out-of-bounds read in OpenSC - CVE-2023-2977

Published: June 14, 2023


Vulnerability identifier: #VU77320
CSH Severity: Low
CVSS v4: 4.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2023-2977
CWE-ID: CWE-125
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to gain access to potentially sensitive information.

The vulnerability exists due to a boundary condition within the cardos_have_verifyrc_package() function in pkcs15 cardos_have_verifyrc_package. A local user can pass a smart card package with malformed ASN1 context to the application, trigger an out-of-bounds read error and read contents of memory on the system.


Affected software

OpenSC
Amazon Linux AMI
Gentoo Linux
Oracle Linux
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise High Performance Computing 12
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Server 12
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Manager Server
SUSE Linux Enterprise Micro
SUSE Linux Enterprise Micro for Rancher
openSUSE Leap Micro
Red Hat Enterprise Linux for IBM z Systems
Anolis OS
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for x86_64
Basesystem Module
openSUSE Leap
Ubuntu
openEuler
Fedora
opensc-pkcs11 (Ubuntu package)
opensc (Ubuntu package)
opensc-debugsource
opensc-debuginfo
opensc
opensc-doc
opensc (Red Hat package)
opensc-help
opensc-32bit-debuginfo
opensc-32bit
dev-libs/opensc

How to mitigate CVE-2023-2977

Install updates from vendor's website.

OpenSC - update to 0.22.0
opensc-pkcs11 (Ubuntu package) - addressed in versions Ubuntu Pro, 0.25.1-2ubuntu1.1
opensc (Ubuntu package) - addressed in versions Ubuntu Pro, 0.25.1-2ubuntu1.1
opensc-debugsource - addressed in versions 0.13.0-3.22.1, 0.19.0-150100.3.22.1, 0.22.0-150400.3.3.1
opensc-debuginfo - addressed in versions 0.13.0-3.22.1, 0.19.0-150100.3.22.1, 0.22.0-150400.3.3.1
opensc - addressed in versions 0.13.0-3.22.1, 0.19.0-150100.3.22.1, 0.22.0-150400.3.3.1
opensc-doc - update to 0.20.0-5.0.1
opensc - update to 0.20.0-5.0.1
opensc (Red Hat package) - addressed in versions 0.20.0-6.el8, 0.23.0-2.el9
opensc - addressed in versions 0.20.0-11, 0.21.0-7
opensc-debugsource - addressed in versions 0.20.0-11, 0.21.0-7
opensc-debuginfo - addressed in versions 0.20.0-11, 0.21.0-7
opensc-help - addressed in versions 0.20.0-11, 0.21.0-7
opensc-32bit-debuginfo - update to 0.22.0-150400.3.3.1
opensc-32bit - update to 0.22.0-150400.3.3.1
opensc - update to 0.23.0-3
opensc - addressed in versions 0.23.0-5.fc37, 0.23.0-5.fc38
dev-libs/opensc - update to 0.24.0

External References

Related Security Bulletins