Security Vulnerability Report
中文
CVE-2026-43336 CVSS 7.5 HIGH

CVE-2026-43336

Published: 2026-05-08 14:16:43
Last Modified: 2026-05-11 08:16:10
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: lib/crypto: chacha: Zeroize permuted_state before it leaves scope Since the ChaCha permutation is invertible, the local variable 'permuted_state' is sufficient to compute the original 'state', and thus the key, even after the permutation has been done. While the kernel is quite inconsistent about zeroizing secrets on the stack (and some prominent userspace crypto libraries don't bother at all since it's not guaranteed to work anyway), the kernel does try to do it as a best practice, especially in cases involving the RNG. Thus, explicitly zeroize 'permuted_state' before it goes out of scope.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Linux Kernel (修复前版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * Conceptual PoC for CVE-2026-43336 * This code demonstrates the nature of the vulnerability: sensitive data * remaining in stack memory after the cryptographic operation. * * Exploitation requires a separate memory read primitive. */ #include <stdio.h> #include <string.h> #include <stdlib.h> #define STATE_SIZE 16 // Mocking the vulnerable function logic void vulnerable_chacha_permutation(unsigned int *state, unsigned int *out_state) { unsigned int permuted_state[STATE_SIZE]; // 1. Copy state to local stack variable memcpy(permuted_state, state, STATE_SIZE * sizeof(unsigned int)); // 2. Perform ChaCha permutation (Invertible operation) // In a real scenario, this is the complex quarter-round logic for (int i = 0; i < STATE_SIZE; i++) { permuted_state[i] = permuted_state[i] ^ 0xDEADBEEF; // Simulated permutation } // 3. Output result memcpy(out_state, permuted_state, STATE_SIZE * sizeof(unsigned int)); // VULNERABILITY: 'permuted_state' is NOT zeroized here. // The data (key material) remains on the stack until overwritten. } // Simulating an attacker reading stack memory after the function returns void simulate_stack_leak() { unsigned int fake_key[STATE_SIZE]; // Initialize with some 'secret' data for(int i=0; i<STATE_SIZE; i++) fake_key[i] = 0xAAAAAAAA + i; unsigned int output[STATE_SIZE]; printf("[*] Calling vulnerable function...\n"); vulnerable_chacha_permutation(fake_key, output); // In a real exploit, the attacker would scan the stack address space // looking for the pattern of 'permuted_state'. printf("[!] Vulnerability: 'permuted_state' may still reside in stack memory.\n"); printf("[!] If an attacker reads this stack frame, they can reverse the permutation.\n"); } int main() { simulate_stack_leak(); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-43336", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-08T14:16:43.383", "lastModified": "2026-05-11T08:16:10.140", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nlib/crypto: chacha: Zeroize permuted_state before it leaves scope\n\nSince the ChaCha permutation is invertible, the local variable\n'permuted_state' is sufficient to compute the original 'state', and thus\nthe key, even after the permutation has been done.\n\nWhile the kernel is quite inconsistent about zeroizing secrets on the\nstack (and some prominent userspace crypto libraries don't bother at all\nsince it's not guaranteed to work anyway), the kernel does try to do it\nas a best practice, especially in cases involving the RNG.\n\nThus, explicitly zeroize 'permuted_state' before it goes out of scope."}], "metrics": {"cvssMetricV31": [{"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "references": [{"url": "https://git.kernel.org/stable/c/066c760acead1fb743bae294dbd89f479ae43b9b", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/1933249263c3a98df79992f61a566476e4163bcc", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/1d761e5a7340c46479fb2399598f331e4fe2c633", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/91999af43ca2125e3b2c18fcfc02912ada02efc3", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/b416a4245f04a450c67a13e6d96056c37c5b33fe", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/bd62d9b44464a6c20a34a74068e7a784d0afa04a", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/e5046823f8fa3677341b541a25af2fcb99a5b1e0", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}, {"url": "https://git.kernel.org/stable/c/e90ee961af515a484f091678ce58a4c3f7b73b02", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}}