Critical Vulnerability in Libgcrypt: Flush-and-Reload Side-Channel Attack
Summary
ALPINE-CVE-2019-12904: In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a flush-and-reload side-channel attack because physical addresses are available to other processes. Affects libgcrypt versions < 1.8.4-r2. Fixed in 1.8.4-r2. 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
Libgcrypt is a cryptographic library that provides various cryptographic functions, including symmetric and asymmetric encryption, hashing, and random number generation. It is widely used in various applications and systems for secure data handling. The library is designed to be efficient and portable, supporting multiple platforms. However, a vulnerability has been identified in its C implementation of AES, which can be exploited due to the exposure of physical addresses to other processes.
Vulnerability Detail
In Libgcrypt version 1.8.4, a flush-and-reload side-channel attack can be executed because physical addresses are accessible to other processes. This vulnerability arises from the C implementation of AES, which is used when an assembly-language implementation is not available. The potential ramifications include unauthorized access to sensitive data, as attackers can exploit this vulnerability to infer cryptographic keys or other confidential information. The vendor has stated that the issue report cannot be validated due to a lack of a detailed attack description.
How To Fix
Minimum fixed version
1.8.4-r2
This is the first release that contains the fix.
sudo apk add --upgrade libgcrypt
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, consider using an assembly-language implementation of AES if available for your platform, or restrict access to sensitive processes to mitigate the risk of side-channel attacks.
Conclusion
The vulnerability in Libgcrypt poses a significant risk due to the potential for side-channel attacks that can expose sensitive data. It is crucial for users to update to the patched version to ensure the security of their applications. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for libgcrypt →
FAQ
The CVSS score of this vulnerability is 5.9, indicating a moderate severity level.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities. Visit Vulert Scanner to check if your application is affected without requiring signup.
The vulnerability can lead to unauthorized access to sensitive data, including cryptographic keys, which can compromise the security of applications using Libgcrypt.
Yes, updating to Libgcrypt version 1.8.4-r2 or later will mitigate this vulnerability.
If immediate updating is not possible, consider implementing access restrictions to sensitive processes or using alternative cryptographic libraries that do not have this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for libgcrypt.