CVE-2024-42098

crypto: ecdh - explicitly zeroize private_key

No CVSS score yet EPSS 0.21%

Published 29 Jul 2024 Updated 23 Nov 2026 CNA: Linux

Check your servers for CVE-2024-42098

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-42098 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.3% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before bd93f02ec39c731ea05f48072f83006281b592f8
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before 39173b04abda87872b43c331468a4a14f8f05ce8
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before fd7ef325911eba1b7191b83cb580463242f2090d
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before 80575b252ab0358b7e93895b2a510beb3cb3f975
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before d96187eb8e59b572a8e6a68b6a9837a867ea29df
affected from 3c4b23901a0c766879dff680cd6bdab47bcdbbd2, before 73e5984e540a76a2ee1868b91590c922da8c24c9
Other versions: unaffected
Linux
affected 4.8
unaffected before 4.8
unaffected from 5.10.275 up to and including 5.10.*
unaffected from 5.15.162 up to and including 5.15.*
unaffected from 6.1.97 up to and including 6.1.*
unaffected from 6.6.37 up to and including 6.6.*
unaffected from 6.9.8 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-42098 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-42098

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-42098
trivy image --scanners vuln IMAGE | grep CVE-2024-42098

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-42098 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.