# CVE-2024-50161: bpf: Check the remaining info\_cnt before repeating btf fields

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-129
- **Published:** 2024-11-07T09:31:38.118Z
- **Modified:** 2026-08-05T11:42:10.527Z

## Who should check

- Anyone running Linux \>= 64e8ee814819f21beeeda00d4119221443d77992, \< 6f957d972feee9b385ea3ae6530310a84e55ba71; \>= 64e8ee814819f21beeeda00d4119221443d77992, \< 797d73ee232dd1833dec4824bc53a22032e97c1c
- Anyone running Linux 6.11

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

- Linux: \>= 64e8ee814819f21beeeda00d4119221443d77992, \< 6f957d972feee9b385ea3ae6530310a84e55ba71; \>= 64e8ee814819f21beeeda00d4119221443d77992, \< 797d73ee232dd1833dec4824bc53a22032e97c1c (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

- Upgrade Linux to 797d73ee232dd1833dec4824bc53a22032e97c1c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

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

## References

- patch: <https://git.kernel.org/stable/c/6f957d972feee9b385ea3ae6530310a84e55ba71>
- patch: <https://git.kernel.org/stable/c/797d73ee232dd1833dec4824bc53a22032e97c1c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-50161>

HTML: <https://flawdb.com/CVE-2024-50161> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-50161>
