CVE-2024-50382

5.9 MEDIUM

📋 TL;DR

This vulnerability in Botan's AES-GCM implementation allows side-channel attacks through compiler-induced secret-dependent control flow. Attackers could potentially extract cryptographic keys by analyzing timing differences during GHASH operations. Affects systems using Botan library with specific LLVM/Clang compilers on RISC-V architecture.

💻 Affected Systems

Products:
  • Botan cryptography library
Versions: All versions before 3.6.0
Operating Systems: Any OS running on RISC-V architecture
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when compiled with LLVM 15 (Clang) on RISC-V targets. Other architectures/compilers not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of AES-GCM encrypted communications allowing decryption of sensitive data and potential authentication bypass.

🟠

Likely Case

Partial key recovery through side-channel analysis requiring physical or network proximity to vulnerable system.

🟢

If Mitigated

Minimal impact if proper network segmentation and access controls prevent attackers from observing cryptographic operations.

🌐 Internet-Facing: MEDIUM - Requires specific conditions (RISC-V, LLVM 15) and ability to observe timing patterns.
🏢 Internal Only: LOW - Typically requires physical access or privileged network position to exploit side-channel.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires side-channel analysis capabilities and specific hardware/compiler conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.6.0

Vendor Advisory: https://github.com/randombit/botan/commit/53b0cfde580e86b03d0d27a488b6c134f662e957

Restart Required: Yes

Instructions:

1. Update Botan to version 3.6.0 or later. 2. Recompile applications using Botan. 3. Restart affected services.

🔧 Temporary Workarounds

Use different compiler

linux

Compile Botan with GCC or other compilers instead of LLVM 15 on RISC-V

CC=gcc CXX=g++ ./configure.py
make clean && make

Disable AES-GCM

all

Configure applications to use alternative encryption modes instead of AES-GCM

🧯 If You Can't Patch

  • Isolate RISC-V systems using vulnerable Botan versions from untrusted networks
  • Implement strict access controls to prevent side-channel observation of cryptographic operations

🔍 How to Verify

Check if Vulnerable:

Check Botan version and compilation environment: 1. Run 'botan version' or check application dependencies. 2. Verify if compiled with LLVM 15 on RISC-V.

Check Version:

botan version || grep -r "Botan" /usr/include /usr/local/include || ldd <application> | grep botan

Verify Fix Applied:

Confirm Botan version is 3.6.0 or later and check commit includes 53b0cfde580e86b03d0d27a488b6c134f662e957

📡 Detection & Monitoring

Log Indicators:

  • Unusual cryptographic operation failures
  • Multiple authentication attempts against encrypted services

Network Indicators:

  • Abnormal timing patterns in encrypted traffic
  • Repeated connection attempts to cryptographic services

SIEM Query:

source="*botan*" OR process="*botan*" AND (version<3.6.0 OR compiler="llvm15")

🔗 References

📤 Share & Export