---
id: CVE-2024-35940
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  pstore/zone: Add a null pointer check to the psz_kmsg_read

  kasprintf() returns a pointer to dynamically allocated memory
  which can be NULL upon failure
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  pstore/zone: Add a null pointer check to the psz_kmsg_read

  kasprintf() returns a pointer to dynamically allocated memory
  which can be NULL upon failure. Ensure the all…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-476
vendor: linux
product: linux_kernel
affected:
  - linux_kernel < 5.10.215
  - 'linux_kernel >= 5.11, < 5.15.155'
  - 'linux_kernel >= 5.16, < 6.1.86'
  - 'linux_kernel >= 6.2, < 6.6.27'
  - 'linux_kernel >= 6.7, < 6.8.6'
  - debian_linux = 10.0
patched:
  - linux_kernel 6.8.6
published: '2024-05-19'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T01:17:54.413'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-35940'
references:
  - url: 'https://git.kernel.org/stable/c/0ff96ec22a84d80a18d7ae8ca7eb111c34ee33bb'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/635594cca59f9d7a8e96187600c34facb8bc0682'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/6f9f2e498eae7897ba5d3e33908917f68ff4abcc'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/98bc7e26e14fbb26a6abf97603d59532475e97f8'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/98e2b97acb875d65bdfc75fc408e67975cef3041'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/ec7256887d072f98c42cdbef4dcc80ddf84c7a70'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/0ff96ec22a84d80a18d7ae8ca7eb111c34ee33bb'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/635594cca59f9d7a8e96187600c34facb8bc0682'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/6f9f2e498eae7897ba5d3e33908917f68ff4abcc'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/98bc7e26e14fbb26a6abf97603d59532475e97f8'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/98e2b97acb875d65bdfc75fc408e67975cef3041'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/ec7256887d072f98c42cdbef4dcc80ddf84c7a70'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-265688.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.00212
epssPercentile: 0.11432
ingestedAt: '2026-10-15T03:30:12.690Z'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2024-05-20T15:01:33.845156Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

pstore/zone: Add a null pointer check to the psz_kmsg_read

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.

## Affected

- `linux_kernel < 5.10.215`
- `linux_kernel >= 5.11, < 5.15.155`
- `linux_kernel >= 5.16, < 6.1.86`
- `linux_kernel >= 6.2, < 6.6.27`
- `linux_kernel >= 6.7, < 6.8.6`
- `debian_linux = 10.0`

## Remediation

Upgrade past the affected range:

- `linux_kernel 6.8.6`
