CVE-2024-36405

5.9 MEDIUM

📋 TL;DR

A timing side-channel vulnerability in liboqs' Kyber key encapsulation mechanism allows local attackers to extract the entire ML-KEM 512 secret key through decapsulation timing measurements. This affects systems using vulnerable versions of liboqs compiled with specific Clang compiler optimizations. The vulnerability enables complete compromise of post-quantum cryptographic keys.

💻 Affected Systems

Products:
  • liboqs
  • applications using liboqs for post-quantum cryptography
Versions: Versions before 0.10.1
Operating Systems: All operating systems where liboqs is compiled with vulnerable Clang versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when compiled with Clang 15-18 using specific optimization flags (-Os, -O1, etc.). Other compilers or optimization levels may not be affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of post-quantum cryptographic keys, enabling decryption of protected communications and impersonation of legitimate entities.

🟠

Likely Case

Local attackers with access to the system can extract secret keys, potentially compromising encrypted communications and authentication mechanisms.

🟢

If Mitigated

With proper patching and compiler configuration, the timing leak is eliminated, maintaining cryptographic security.

🌐 Internet-Facing: LOW - This is primarily a local attack requiring access to the system running the vulnerable code.
🏢 Internal Only: MEDIUM - Internal attackers with local access could exploit this to compromise cryptographic keys used within the organization.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Proof-of-concept demonstrates key extraction in ~10 minutes. Requires local access and ability to perform timing measurements.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.10.1

Vendor Advisory: https://github.com/open-quantum-safe/liboqs/security/advisories/GHSA-f2v9-5498-2vpp

Restart Required: Yes

Instructions:

1. Update liboqs to version 0.10.1 or later. 2. Recompile any applications using liboqs with the updated library. 3. Restart affected services using the library.

🔧 Temporary Workarounds

Compiler optimization workaround

all

Use compiler options that produce vectorized code which may not leak secret information, though this is not guaranteed to be reliable.

Consider using -O2 or -O3 optimization levels instead of -Os or -O1 when compiling with Clang 15-18

🧯 If You Can't Patch

  • Isolate systems using vulnerable liboqs versions from untrusted users and limit local access
  • Consider using alternative post-quantum cryptographic implementations until patching is possible

🔍 How to Verify

Check if Vulnerable:

Check liboqs version and compilation details. If using version <0.10.1 compiled with Clang 15-18 using -Os or -O1 optimizations, system is vulnerable.

Check Version:

Check liboqs version in your application or run: ldd <application> | grep liboqs to identify usage, then check version in package manager or build configuration.

Verify Fix Applied:

Verify liboqs version is 0.10.1 or later and applications have been recompiled with the updated library.

📡 Detection & Monitoring

Log Indicators:

  • Unusual timing patterns in cryptographic operations
  • Multiple failed decryption attempts with timing measurements

Network Indicators:

  • Unusual local process activity during cryptographic operations

SIEM Query:

Process monitoring for timing measurement tools running concurrently with applications using liboqs

🔗 References

📤 Share & Export