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

- Severity: Medium 4.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-07-30T07:47:00.343Z
- Modified: 2026-10-30T13:17:32.527Z
- Weaknesses: CWE-669
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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)

(As written by CVE List.)

## Affected

- Linux Linux: from e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 before f2e43af834fcc652b324384f14b561cf610742d4; from e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 before 62151a0acde90823bdfa991d598c85cf4b1d387d; from e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 before 22e6824622e8a8889df0f8fc4ed5aea0e702a694; 4.11 (not affected: before 4.11; from 6.1.191 up to 6.1.*; from 6.9.9 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 4.11 before 6.9.9

## References

- <https://git.kernel.org/stable/c/f2e43af834fcc652b324384f14b561cf610742d4>
- <https://git.kernel.org/stable/c/62151a0acde90823bdfa991d598c85cf4b1d387d> (patch)
- <https://git.kernel.org/stable/c/22e6824622e8a8889df0f8fc4ed5aea0e702a694> (patch)

## Sources

- CVE List: [CVE-2024-42158](https://www.cve.org/CVERecord?id=CVE-2024-42158), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2024-42158](https://nvd.nist.gov/vuln/detail/CVE-2024-42158), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2024-42158 · Whole record: https://cve.day/CVE-2024-42158.json · Rebuilt by cve.day 2026-11-25T22:58:43.422Z
