# CVE-2024-50262: bpf: Fix out-of-bounds write in trie\_get\_next\_key()

> 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.38% (percentile 24, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-11-09T10:17:50.461Z
- **Modified:** 2026-10-15T01:19:11.013Z

## Who should check

- Anyone running Linux \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< e8494ac079814a53fbc2258d2743e720907488ed; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 91afbc0eb3c90258ae378ae3c6ead3d2371e926d; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 590976f921723d53ac199c01d5b7b73a94875e68; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 86c8ebe02d8806dd8878d0063e8e185622ab6ea6; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< a035df0b98df424559fd383e8e1a268f422ea2ba; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 90a6e0e1e151ef7a9282e78f54c3091de2dcc99c; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< c4b4f9a9ab82238cb158fa4fe61a8c0ae21a4980; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21
- Anyone running Linux 4.16

## Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix out-of-bounds write in trie\_get\_next\_key()

trie\_get\_next\_key() allocates a node stack with size trie-\>max\_prefixlen,
while it writes (trie-\>max\_prefixlen + 1) nodes to the stack when it has
full paths from the root to leaves. For example, consider a trie with
max\_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ...
0x00/8 inserted. Subsequent calls to trie\_get\_next\_key with \_key with
.prefixlen = 8 make 9 nodes be written on the node stack with size 8.

## Affected and fixed versions

- Linux: \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< e8494ac079814a53fbc2258d2743e720907488ed; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 91afbc0eb3c90258ae378ae3c6ead3d2371e926d; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 590976f921723d53ac199c01d5b7b73a94875e68; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 86c8ebe02d8806dd8878d0063e8e185622ab6ea6; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< a035df0b98df424559fd383e8e1a268f422ea2ba; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 90a6e0e1e151ef7a9282e78f54c3091de2dcc99c; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< c4b4f9a9ab82238cb158fa4fe61a8c0ae21a4980; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21 (cvelist)
- Linux: 4.16 (cvelist)

## Mitigation

- Upgrade Linux to 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21 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-50262. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50262.md
Affected: Linux >= b471f2f1de8b816f1e799b80aa92588f3566e4bd, < e8494ac079814a53fbc2258d2743e720907488ed; >= b471f2f1de8b816f1e799b80aa92588f3566e4bd, < 91afbc0eb3c90258ae378ae3c6ead3d2371e926d; >= b471f2f1de8b816f1e799b80aa92588f3566e4bd, < 590976f921723d53ac199c01d5b7b73a94875e68; >= b471f2f1de8b816f1e799b8…
Fixed in: Linux 91afbc0eb3c90258ae378ae3c6ead3d2371e926d, Linux 590976f921723d53ac199c01d5b7b73a94875e68, Linux 86c8ebe02d8806dd8878d0063e8e185622ab6ea6, Linux 90a6e0e1e151ef7a9282e78f54c3091de2dcc99c, Linux 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21

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-50262 being exploited?

There is no confirmed exploitation: CVE-2024-50262 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.38% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-50262?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-50262?

Linux \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< e8494ac079814a53fbc2258d2743e720907488ed; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 91afbc0eb3c90258ae378ae3c6ead3d2371e926d; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 590976f921723d53ac199c01d5b7b73a94875e68; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 86c8ebe02d8806dd8878d0063e8e185622ab6ea6; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< a035df0b98df424559fd383e8e1a268f422ea2ba; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 90a6e0e1e151ef7a9282e78f54c3091de2dcc99c; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< c4b4f9a9ab82238cb158fa4fe61a8c0ae21a4980; \>= b471f2f1de8b816f1e799b80aa92588f3566e4bd, \< 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21; Linux 4.16.

### Is there a fix for CVE-2024-50262?

Yes. Fixed in Linux 91afbc0eb3c90258ae378ae3c6ead3d2371e926d, Linux 590976f921723d53ac199c01d5b7b73a94875e68, Linux 86c8ebe02d8806dd8878d0063e8e185622ab6ea6, Linux 90a6e0e1e151ef7a9282e78f54c3091de2dcc99c, Linux 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21. Upgrade Linux to 13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21 or later.

### How do I check if I'm affected by CVE-2024-50262?

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/e8494ac079814a53fbc2258d2743e720907488ed>
- patch: <https://git.kernel.org/stable/c/91afbc0eb3c90258ae378ae3c6ead3d2371e926d>
- patch: <https://git.kernel.org/stable/c/590976f921723d53ac199c01d5b7b73a94875e68>
- patch: <https://git.kernel.org/stable/c/86c8ebe02d8806dd8878d0063e8e185622ab6ea6>
- patch: <https://git.kernel.org/stable/c/a035df0b98df424559fd383e8e1a268f422ea2ba>
- patch: <https://git.kernel.org/stable/c/90a6e0e1e151ef7a9282e78f54c3091de2dcc99c>
- patch: <https://git.kernel.org/stable/c/c4b4f9a9ab82238cb158fa4fe61a8c0ae21a4980>
- patch: <https://git.kernel.org/stable/c/13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-398330.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-355557.html>

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

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