CVE-2024-42158 s390/pkey: Use kfree_sensitive() to fix Coccinelle warnings

Medium 4.1 Published Updated

The Linux kernel s390/pkey module failed to securely wipe sensitive memory before freeing it, potentially allowing attackers to read residual cryptographic data.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-42158?

CVE-2024-42158 is a medium-severity vulnerability in Linux kernel, published on 30 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:

s390/pkey: Use kfree_sensitive() to fix Coccinelle warnings

Replace memzero_explicit() and kfree() with kfree_sensitive() to fix warnings reported by Coccinelle:

WARNING opportunity for kfree_sensitive/kvfree_sensitive (line 1506) WARNING opportunity for kfree_sensitive/kvfree_sensitive (line 1643) WARNING opportunity for kfree_sensitive/kvfree_sensitive (line 1770)

Weakness: CWE-669

Which versions are affected by CVE-2024-42158?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-42158?

Apply the vendor's patch.

Is CVE-2024-42158 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-47344, AZL-47396, BELL-CVE-2024-42158, DEBIAN-CVE-2024-42158, GHSA-7r4w-v667-c6cr, ROOT-OS-DEBIAN-11-CVE-2024-42158 and 2 more.

Is CVE-2024-42158 in your software?

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

Check your SBOMs for free