---
id: CVE-2024-42158
title: 's390/pkey: Use kfree_sensitive() to fix Coccinelle warnings'
summary: |-
  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:

  WARN…
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 <
    f2e43af834fcc652b324384f14b561cf610742d4
  - >-
    Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 <
    62151a0acde90823bdfa991d598c85cf4b1d387d
  - >-
    Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 <
    22e6824622e8a8889df0f8fc4ed5aea0e702a694
  - Linux 4.11
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2024-09-10T16:15:02.030879Z'
published: '2024-07-30'
updated: '2026-10-30'
sourceUpdated: '2026-10-30T12:18:57.021Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-42158'
references:
  - url: 'https://git.kernel.org/stable/c/f2e43af834fcc652b324384f14b561cf610742d4'
  - url: 'https://git.kernel.org/stable/c/62151a0acde90823bdfa991d598c85cf4b1d387d'
  - url: 'https://git.kernel.org/stable/c/22e6824622e8a8889df0f8fc4ed5aea0e702a694'
tags:
  - cve.org
epss: 0.00214
epssPercentile: 0.11788
ingestedAt: '2026-11-03T13:45:42.683Z'
---

## Overview

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)

## Affected

- `Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 < f2e43af834fcc652b324384f14b561cf610742d4`
- `Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 < 62151a0acde90823bdfa991d598c85cf4b1d387d`
- `Linux >= e80d4af0a320972aac58e2004d0ba4e44ef4c5c7 < 22e6824622e8a8889df0f8fc4ed5aea0e702a694`
- `Linux 4.11`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
