Heap-buffer-overflow in myeid_create_key in opensc
Summary
OSV-2022-451: Heap-buffer-overflow in myeid_create_key. Affects opensc versions >= bec4f63c5b8308d7fdca842c5c0b62c3491d106a, < 367c3ad2ef2c10cb29602f72163e7fb23c3f5827. Fixed in 367c3ad2ef2c10cb29602f72163e7fb23c3f5827. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
OpenSC is an open-source smart card library that provides a set of cryptographic functions and protocols for interacting with smart cards. It is commonly used in applications that require secure authentication and data encryption. The myeid_create_key function in OpenSC is responsible for creating a new key on a smart card. However, a vulnerability has been discovered in this function that can lead to a heap-buffer-overflow write error.
Vulnerability Detail
The vulnerability in myeid_create_key can be triggered when a malicious attacker provides specially crafted input to the function. This can result in a heap-buffer-overflow write error, potentially leading to arbitrary code execution or a denial of service. The vulnerability was reported through the OSS-Fuzz project and has been assigned a high severity rating. The affected version of OpenSC is bec4f63c5b8308d7fdca842c5c0b62c3491d106a, and it has been fixed in version 367c3ad2ef2c10cb29602f72163e7fb23c3f5827.
How To Fix
Minimum fixed version
367c3ad2ef2c10cb29602f72163e7fb23c3f5827
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is strongly advised to update to the fixed version of OpenSC as soon as possible.
Conclusion
In conclusion, a heap-buffer-overflow write vulnerability has been discovered in the myeid_create_key function of OpenSC. This vulnerability can potentially lead to arbitrary code execution or a denial of service. It is crucial to update to the fixed version of OpenSC to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for opensc →
FAQ
OpenSC is an open-source smart card library that provides cryptographic functions and protocols for interacting with smart cards.
This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial of service.
This vulnerability was discovered through the OSS-Fuzz project, which performs continuous fuzz testing on open-source software.
This vulnerability has been assigned a high severity rating.
To fix this vulnerability, update to the latest version of OpenSC (version 367c3ad2ef2c10cb29602f72163e7fb23c3f5827).
References
Related vulnerabilities
Recent vulnerabilities recorded for opensc.