CVE-2024-50161
bpf: Check the remaining info_cnt before repeating btf fields
Mitigation
- Upgrade Linux to 797d73ee232dd1833dec4824bc53a22032e97c1c or later.
Who should check
- Anyone running Linux >= 64e8ee814819f21beeeda00d4119221443d77992, < 6f957d972feee9b385ea3ae6530310a84e55ba71; >= 64e8ee814819f21beeeda00d4119221443d77992, < 797d73ee232dd1833dec4824bc53a22032e97c1c
- Anyone running Linux 6.11
Vulnerability facts
- Affected
- Linux >= 64e8ee814819f21beeeda00d4119221443d77992, < 6f957d972feee9b385ea3ae6530310a84e55ba71; >= 64e8ee814819f21beeeda00d4119221443d77992, < 797d73ee232dd1833dec4824bc53a22032e97c1c; Linux 6.11
- Fixed in
- Linux 6f957d972feee9b385ea3ae6530310a84e55ba71, Linux 797d73ee232dd1833dec4824bc53a22032e97c1c
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- CWE
- CWE-129
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Check the remaining info_cnt before repeating btf fields When trying to repeat the btf fields for array of nested struct, it doesn't check the remaining info_cnt. The following splat will be reported when the value of ret * nelems is greater than BTF_FIELDS_MAX: ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in ../kernel/bpf/btf.c:3951:49 index 11 is out of range for type 'btf_field_info [11]' CPU: 6 UID: 0 PID: 411 Comm: test_progs ...... 6.11.0-rc4+ #1 Tainted: [O]=OOT_MODULE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ... Call Trace: <TASK> dump_stack_lvl+0x57/0x70 dump_stack+0x10/0x20 ubsan_epilogue+0x9/0x40 __ubsan_handle_out_of_bounds+0x6f/0x80 ? kallsyms_lookup_name+0x48/0xb0 btf_parse_fields+0x992/0xce0 map_create+0x591/0x770 __sys_bpf+0x229/0x2410 __x64_sys_bpf+0x1f/0x30 x64_sys_call+0x199/0x9f0 do_syscall_64+0x3b/0xc0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7fea56f2cc5d ...... </TASK> ---[ end trace ]--- Fix it by checking the remaining info_cnt in btf_repeat_fields() before repeating the btf fields.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-50161. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-50161.md Affected: Linux >= 64e8ee814819f21beeeda00d4119221443d77992, < 6f957d972feee9b385ea3ae6530310a84e55ba71; >= 64e8ee814819f21beeeda00d4119221443d77992, < 797d73ee232dd1833dec4824bc53a22032e97c1c; Linux 6.11 Fixed in: Linux 6f957d972feee9b385ea3ae6530310a84e55ba71, Linux 797d73ee232dd1833dec4824bc53a22032e97c1c Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2024-50161 being exploited?
There is no confirmed exploitation: CVE-2024-50161 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-50161?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-50161?
Linux >= 64e8ee814819f21beeeda00d4119221443d77992, < 6f957d972feee9b385ea3ae6530310a84e55ba71; >= 64e8ee814819f21beeeda00d4119221443d77992, < 797d73ee232dd1833dec4824bc53a22032e97c1c; Linux 6.11.
Is there a fix for CVE-2024-50161?
Yes. Fixed in Linux 6f957d972feee9b385ea3ae6530310a84e55ba71, Linux 797d73ee232dd1833dec4824bc53a22032e97c1c. Upgrade Linux to 797d73ee232dd1833dec4824bc53a22032e97c1c or later.
How do I check if I'm affected by CVE-2024-50161?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.