CVE-2024-42098 crypto: ecdh - explicitly zeroize private_key

Medium 5.5 Published Updated

An attacker with local access could potentially read residual private key material from memory due to incomplete zeroization in the Linux kernel ECDH implementation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-42098?

CVE-2024-42098 is a medium-severity vulnerability in Linux kernel, published on 29 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Which versions are affected by CVE-2024-42098?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-42098?

Apply the vendor's patch.

Is CVE-2024-42098 being exploited?

There is no known exploitation of CVE-2024-42098 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-42098, DEBIAN-CVE-2024-42098, GHSA-4794-rjc7-hpw2, ROOT-OS-DEBIAN-11-CVE-2024-42098, UBUNTU-CVE-2024-42098.

Is CVE-2024-42098 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free