Bug 2300717 (CVE-2024-42098)

Summary: CVE-2024-42098 kernel: crypto: ecdh - explicitly zeroize private_key
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.15.162, kernel 6.1.97, kernel 6.6.37, kernel 6.9.8, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux Kernel's Elliptic Curve Diffie-Hellman functionality, where the private_key is overwritten. In some special cases and when error path happens, this issue could allow leakage of this private key.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2301756    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-29 18:21:57 UTC
In the Linux kernel, the following vulnerability has been resolved:

crypto: ecdh - explicitly zeroize private_key

private_key is overwritten with the key parameter passed in by the
caller (if present), or alternatively a newly generated private key.
However, it is possible that the caller provides a key (or the newly
generated key) which is shorter than the previous key. In that
scenario, some key material from the previous key would not be
overwritten. The easiest solution is to explicitly zeroize the entire
private_key array first.

Note that this patch slightly changes the behavior of this function:
previously, if the ecc_gen_privkey failed, the old private_key would
remain. Now, the private_key is always zeroized. This behavior is
consistent with the case where params.key is set and ecc_is_key_valid
fails.

Comment 1 Mauro Matteo Cascella 2024-07-30 18:05:20 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301756]

Comment 9 Mauro Matteo Cascella 2024-07-30 18:11:48 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072912-CVE-2024-42098-fe86@gregkh/T/#u