# CVE-2024-42072: bpf: Fix may_goto with negative offset.

- 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.32%, higher than 17% of CVEs (2026-11-30)
- Published: 2024-07-29T15:52:35.598Z
- Modified: 2026-08-05T11:35:30.329Z
- 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: Fix may_goto with negative offset.

Zac's syzbot crafted a bpf prog that exposed two bugs in may_goto.
The 1st bug is the way may_goto is patched. When offset is negative
it should be patched differently.
The 2nd bug is in the verifier:
when current state may_goto_depth is equal to visited state may_goto_depth
it means there is an actual infinite loop. It's not correct to prune
exploration of the program at this point.
Note, that this check doesn't limit the program to only one may_goto insn,
since 2nd and any further may_goto will increment may_goto_depth only
in the queued state pushed for future exploration. The current state
will have may_goto_depth == 0 regardless of number of may_goto insns
and the verifier has to explore the program until bpf_exit.

(As written by CVE List.)

## Affected

- Linux Linux: from 011832b97b311bb9e3c27945bc0d1089a14209c9 before 175827e04f4be53f3dfb57edf12d0d49b18fd939; from 011832b97b311bb9e3c27945bc0d1089a14209c9 before 2b2efe1937ca9f8815884bd4dcd5b32733025103; 6.9 (not affected: before 6.9; from 6.9.8 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 6.9 before 6.9.8; 6.10

## 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 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/175827e04f4be53f3dfb57edf12d0d49b18fd939> (patch)
- <https://git.kernel.org/stable/c/2b2efe1937ca9f8815884bd4dcd5b32733025103> (patch)

## Sources

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

---

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