CVE-2024-42098

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-42098
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-42098.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-42098
Downstream
Related
Published
2024-07-29T17:39:33.395Z
Modified
2025-11-28T02:34:30.339699Z
Summary
crypto: ecdh - explicitly zeroize private_key
Details

In the Linux kernel, the following vulnerability has been resolved:

crypto: ecdh - explicitly zeroize private_key

privatekey 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 privatekey array first.

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

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42098.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
39173b04abda87872b43c331468a4a14f8f05ce8
Fixed
fd7ef325911eba1b7191b83cb580463242f2090d
Fixed
80575b252ab0358b7e93895b2a510beb3cb3f975
Fixed
d96187eb8e59b572a8e6a68b6a9837a867ea29df
Fixed
73e5984e540a76a2ee1868b91590c922da8c24c9

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.15.162
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.97
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.37
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.8