Bug 2300510 (CVE-2024-42072) - CVE-2024-42072 kernel: bpf: Fix may_goto with negative offset.
Summary: CVE-2024-42072 kernel: bpf: Fix may_goto with negative offset.
Keywords:
Status: NEW
Alias: CVE-2024-42072
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2301707
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-29 16:27 UTC by OSIDB Bzimport
Modified: 2024-07-31 04:38 UTC (History)
4 users (show)

Fixed In Version: kernel 6.9.8, kernel 6.10
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-07-29 16:27:17 UTC
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.

Comment 1 Mauro Matteo Cascella 2024-07-30 16:37:17 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072953-CVE-2024-42072-d6af@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-30 16:37:37 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301707]


Note You need to log in before you can comment on or make changes to this bug.