CVE-2024-36405

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-36405
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-36405.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-36405
Aliases
  • GHSA-f2v9-5498-2vpp
Downstream
Related
Published
2024-06-10T12:47:17Z
Modified
2025-11-09T06:09:41.978585Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Control-flow timing leak in Kyber reference implementation when compiled with Clang 15-18 for -Os, -O1 and other options
Details

liboqs is a C-language cryptographic library that provides implementations of post-quantum cryptography algorithms. A control-flow timing lean has been identified in the reference implementation of the Kyber key encapsulation mechanism when it is compiled with Clang 15-18 for -Os, -O1, and other compilation options. A proof-of-concept local attack on the reference implementation leaks the entire ML-KEM 512 secret key in ~10 minutes using end-to-end decapsulation timing measurements. The issue has been fixed in version 0.10.1. As a possible workaround, some compiler options may produce vectorized code that does not leak secret information, however relying on these compiler options as a workaround may not be reliable.

Database specific
{
    "cwe_ids": [
        "CWE-208",
        "CWE-385"
    ]
}
References

Affected packages

Git / github.com/open-quantum-safe/liboqs

Affected ranges

Type
GIT
Repo
https://github.com/open-quantum-safe/liboqs
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.10.0
0.2.0
0.3.0
0.4.0
0.5.0
0.6.0
0.6.0-rc1
0.6.0-rc2
0.6.0-rc3
0.7.0
0.7.0-rc3
0.7.0-rc4
0.7.1
0.7.1-rc1
0.7.2
0.7.2-rc1
0.7.2-rc2
0.8.0
0.8.0-rc1
0.9.0
0.9.0-rc1

Other

ietf116

master-0.*

master-0.1.0

Database specific

vanir_signatures

[
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber768_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-089ba014",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-512-ipd_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-0a431f03",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-512-ipd_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-0c2f5121",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-512-ipd_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-187b9678",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-768-ipd_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-2cc10014",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber1024_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-33fb61c8",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber1024_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-34c724c6",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber768_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-3a2034c3",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/kyber/pqcrystals-kyber_kyber1024_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-406f8286",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-512-ipd_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-43cca0ef",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-768-ipd_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-676f22b6",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-768-ipd_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-75045834",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-1024-ipd_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-7ff444b0",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber512_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-825d4f5f",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber512_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-aba01a29",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/kyber/pqcrystals-kyber_kyber768_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-bce5f522",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber512_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-c4cbbc8c",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber1024_ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-c7561182",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/kyber/pqcrystals-kyber_kyber768_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-cef25e27",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-768-ipd_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-dc90322e",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-1024-ipd_ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-e076e7dc",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-1024-ipd_avx2/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-e262c6f7",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/ml_kem/pqcrystals-kyber-standard_ml-kem-1024-ipd_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-e736d74a",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "src/kem/kyber/pqcrystals-kyber_kyber512_ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-f20fb8d7",
        "source": "https://github.com/open-quantum-safe/liboqs/commit/982c762c242ef549c914891b47bf6e0ed6321f91"
    }
]

Git / github.com/pq-crystals/kyber

Affected ranges

Type
GIT
Repo
https://github.com/pq-crystals/kyber
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v3.*

v3.0

Database specific

vanir_signatures

[
    {
        "signature_version": "v1",
        "target": {
            "file": "ref/verify.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "129159944488822175469922892442807990041"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-16c196d2",
        "source": "https://github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c"
    },
    {
        "signature_version": "v1",
        "target": {
            "file": "ref/poly.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "234689300167707083092684360083613531595",
                "146167400202682821831380952758195444065",
                "236930179887150445801603796343847781378",
                "132795227996355397657871530656993888564",
                "98085589001609537616281371573502341052",
                "220137936012977417917610474229036188693",
                "230950984777136591460947291073851511222",
                "152441685494613281378637909075275929112",
                "94291155035070951370862928007735827934",
                "301827595347717556978065680018854490571",
                "234954458262773481690591469489954392452",
                "117445256152861512856057429889126623864",
                "140998155976398254487220450403221579936"
            ]
        },
        "deprecated": false,
        "id": "CVE-2024-36405-230f7be1",
        "source": "https://github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c"
    },
    {
        "signature_version": "v1",
        "target": {
            "function": "poly_frommsg",
            "file": "ref/poly.c"
        },
        "signature_type": "Function",
        "digest": {
            "function_hash": "318988264785853182587844791599630315127",
            "length": 444.0
        },
        "deprecated": false,
        "id": "CVE-2024-36405-c935abed",
        "source": "https://github.com/pq-crystals/kyber/commit/9b8d30698a3e7449aeb34e62339d4176f11e3c6c"
    }
]