# CVE-2024-42068: bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- 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.31%, higher than 25% of CVEs (2026-12-01)
- Published: 2024-07-29T15:52:32.538Z
- Modified: 2026-10-21T13:17:45.587Z
- Weaknesses: CWE-252
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 60a3b2253c413cf601783b070507d7dd6620c954 before a359696856ca9409fb97655c5a8ef0f549cb6e03; from 60a3b2253c413cf601783b070507d7dd6620c954 before e4f602e3ff749ba770bf8ff10196e18358de6720; from 60a3b2253c413cf601783b070507d7dd6620c954 before 2bbfffa802adc30b772d0e0f881a13c3804a965c; from 60a3b2253c413cf601783b070507d7dd6620c954 before 05412471beba313ecded95aa17b25fe84bb2551a; from 60a3b2253c413cf601783b070507d7dd6620c954 before 7d2cc63eca0c993c99d18893214abf8f85d566d8; 3.18 (not affected: before 3.18; from 5.15.162 up to 5.15.*; from 6.1.97 up to 6.1.*; from 6.6.160 up to 6.6.*; from 6.9.8 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: before 5.15.162; from 5.16 before 6.1.97; from 6.2 before 6.6.37; from 6.7 before 6.9.8

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/a359696856ca9409fb97655c5a8ef0f549cb6e03> (patch)
- <https://git.kernel.org/stable/c/e4f602e3ff749ba770bf8ff10196e18358de6720> (patch)
- <https://git.kernel.org/stable/c/2bbfffa802adc30b772d0e0f881a13c3804a965c>
- <https://git.kernel.org/stable/c/05412471beba313ecded95aa17b25fe84bb2551a> (patch)
- <https://git.kernel.org/stable/c/7d2cc63eca0c993c99d18893214abf8f85d566d8> (patch)
- <https://git.kernel.org/stable/c/fdd411af8178edc6b7bf260f8fa4fba1bedd0a6d> (patch)
- <https://git.kernel.org/stable/c/e3540e5a7054d6daaf9a1415a48aacb092112a89> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

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

---

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