CVE-2024-50383
NoneCVSS
—
EPSS
0.5%
Published
Oct 23, 2024
CISA due date
—
Cloudanix analysis
A compiler quirk on some older 32-bit computers could let attackers gradually learn secret encryption keys used by software that relies on this cryptography library.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Compiler optimization on certain GCC versions for 32-bit MIPS and x86-i386 can skip an addition in the donna128 implementation when a carry flag is unset, introducing secret-dependent timing variation in ChaCha-Poly1305 and x25519 operations.
Why it matters to the business
Organizations relying on Botan for TLS, VPN, or other cryptographic services on 32-bit systems face potential exposure of long-term keys or session secrets through side-channel observation, increasing risk of data compromise until patched versions are deployed.
How an attack unfolds
An attacker with local or network access to a target process using the vulnerable donna128 routines measures timing or power side effects during ChaCha-Poly1305 or x25519 operations; repeated observations allow recovery of secret scalars or keys due to the skipped addition creating observable branches.
How to fix it
Upgrade randombit/botan to the commit 53b0cfde580e86b03d0d27a488b6c134f662e957 or later release (3.6.0+); rebuild all dependent packages and restart services that link against the library; disable 32-bit builds on affected architectures where feasible until verification.
How to confirm the fix worked
Confirm the installed Botan version is 3.6.0 or newer; inspect lib/utils/donna128.h for the corrected addition sequence; recompile with the same GCC flags and verify constant-time behavior via timing tests or binary inspection on target 32-bit platforms.
Typical attack path
- Identify systems running Botan < 3.6.0 on 32-bit MIPS or x86-i386 with affected GCC versions
- Trigger cryptographic operations that invoke ChaCha-Poly1305 or x25519
- Collect high-resolution timing or microarchitectural traces during secret-dependent addition
- Apply statistical analysis to recover secret material from observed timing variation
How to detect it
Review application and system logs for unusual cryptographic operation latency patterns or repeated connections triggering ChaCha-Poly1305/x25519; correlate with process execution of vulnerable Botan builds on 32-bit systems; no public exploit artifacts are known.
What your security team should do
- Prioritize upgrade of all Botan instances to the fixed commit within 30 days given the cryptographic nature of the flaw
- Inventory 32-bit deployments using Botan and restrict use of ChaCha-Poly1305 or x25519 until patched
- Add package version checks to build pipelines and container images to prevent reintroduction of vulnerable versions
- Monitor upstream Botan releases and rebuild policies for any downstream dependents
The record
Botan before 3.6.0, when certain GCC versions are used, has a compiler-induced secret-dependent operation in lib/utils/donna128.h in donna128 (used in Chacha-Poly1305 and x25519). An addition can be skipped if a carry is not set. This was observed for GCC 11.3.0 with -O2 on MIPS, and GCC on x86-i386. (Only 32-bit processors can be affected.)
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | botan | 0 | No fix |
| Debian:12 | botan | 0 | No fix |
| Debian:13 | botan | 0 | No fix |
| Debian:14 | botan | 0 | 2.19.5+dfsg-3 |
| Mageia:9 | botan2 | 0 | 2.19.5-1.1.mga9 |
| SUSE:Package Hub 15 SP5 | Botan | 0 | 2.19.5-bp156.3.6.1 |
| SUSE:Package Hub 15 SP6 | Botan | 0 | 2.19.5-bp156.3.6.1 |
| Ubuntu:18.04:LTS | botan | 0 | No fix |
| Ubuntu:20.04:LTS | botan | 0 | No fix |
| Ubuntu:20.04:LTS | oscar | 0 | No fix |
| Ubuntu:22.04:LTS | botan | 0 | No fix |
| Ubuntu:22.04:LTS | oscar | 0 | No fix |
| Ubuntu:24.04:LTS | botan | 0 | No fix |
| Ubuntu:24.04:LTS | oscar | 0 | No fix |
| Ubuntu:24.10 | botan | 0 | No fix |
| Ubuntu:24.10 | oscar | 0 | No fix |
| Ubuntu:25.04 | oscar | 0 | No fix |
| Ubuntu:25.10 | oscar | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | botan | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | botan | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | oscar | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | botan | 0 | 2.19.1+dfsg-2ubuntu1+esm1 |
| Ubuntu:Pro:24.04:LTS | botan | 0 | 2.19.3+dfsg-1ubuntu2+esm1 |
| openSUSE:Leap 15.5 | Botan | 0 | 2.19.5-bp156.3.6.1 |
| openSUSE:Leap 15.6 | Botan | 0 | 2.19.5-bp156.3.6.1 |
Related vulnerabilities
- CVE-2024-50382 Botan before 3.6.0, when certain LLVM versions are used, has compiler-induced… Also affects botan
- CVE-2024-34702 Botan is a C++ cryptography library. Also affects botan
- CVE-2024-39312 Botan is a C++ cryptography library. Also affects botan
- CVE-2024-34703 Botan is a C++ cryptography library. Also affects botan