CVE-2021-42779
Description
A heap use after free issue was found in Opensc before version 0.22.0 in sc_file_valid.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap use-after-free vulnerability in OpenSC before 0.22.0 allows a crafted smart card to cause a denial of service or potentially execute arbitrary code.
Vulnerability
A heap use-after-free issue exists in OpenSC versions prior to 0.22.0 in the sc_file_valid function. The flaw occurs when a smart card provides specially crafted data that leads to a free of a heap object followed by a later use. The exact code path is triggered during file operations including sc_file_valid [1].
Exploitation
An attacker must have physical access to the system or be able to insert a malicious smart card into a reader used by an application relying on OpenSC. The attacker crafts the card's responses to trigger the use-after-free during file validation routines [1]. No authentication is required beyond the ability to interact with the smart card reader.
Impact
Successful exploitation can lead to a denial of service via application crash, and under certain heap conditions may allow arbitrary code execution in the context of the process using OpenSC [3]. The CVSS base score is not fully disclosed, but the Red Hat bug report marks this as low severity [1].
Mitigation
OpenSC version 0.22.0 fixes this vulnerability [1][3]. Gentoo's GLSA 202209-03 recommends upgrading to >=dev-libs/opensc-0.22.0 via emerge --sync && emerge --ask --oneshot --verbose ">=dev-libs/opensc-0.22.0" [3]. No workaround is known for versions earlier than 0.22.0.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
30(expand)+ 1 more
- (no CPE)
- (no CPE)range: <0.22.0
- osv-coords28 versionspkg:rpm/opensuse/opensc&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/opensc&distro=openSUSE%20Tumbleweedpkg:rpm/suse/opensc&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/opensc&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP2pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/opensc&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/opensc&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/opensc&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/opensc&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/opensc&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 0.19.0-150100.3.16.1+ 27 more
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.22.0-1.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.18.0-150000.3.23.1
- (no CPE)range: < 0.18.0-150000.3.23.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.18.0-150000.3.23.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.18.0-150000.3.23.1
- (no CPE)range: < 0.19.0-150100.3.16.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
- (no CPE)range: < 0.13.0-3.19.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- security.gentoo.org/glsa/202209-03mitrevendor-advisory
- lists.debian.org/debian-lts-announce/2023/06/msg00025.htmlmitremailing-list
- bugs.chromium.org/p/oss-fuzz/issues/detailmitre
- bugzilla.redhat.com/show_bug.cgimitre
- github.com/OpenSC/OpenSC/commit/1db88374mitre
News mentions
0No linked articles in our index yet.