Vulnerability details
CVE-2024-50253
bpf: Check the validity of nr_words in bpf_iter_bits_new()
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Check the validity of nr_words in bpf_iter_bits_new() Check the validity of nr_words in bpf_iter_bits_new(). Without this check, when multiplication overflow occurs for nr_bits (e.g., when nr_words = 0x0400-0001, nr_bits becomes 64), stack corruption may occur due to bpf_probe_read_kernel_common(..., nr_bytes = 0x2000-0008). Fix it by limiting the maximum value of nr_words to 511. The value is derived from the current implementation of BPF memory allocator. To ensure compatibility if the BPF memory allocator's size limitation changes in the future, use the helper bpf_mem_alloc_check_size() to check whether nr_bytes is too larger. And return -E2BIG instead of -ENOMEM for oversized nr_bytes.
CVSS scores
| Score | Version | Source | Vector |
|---|---|---|---|
| 5.5Medium | 3.1 | CISA ADP / Vulnrichment (CISA-ADP) | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| 7.8High | 3.1 | CVEProject cvelistV5 (CNA) (Linux) | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
| Vendor | Product | Versions | Source |
|---|---|---|---|
| Linux | Linux | 6.11 | CVEProject cvelistV5 (CNA) |
| Linux | Linux | 4665415975b0827e9646cab91c61d02a6b364d59 ≤ v < c9539e09c67880ecd88b51188c346a2cc078b06c | CVEProject cvelistV5 (CNA) |
| Linux | Linux | 4665415975b0827e9646cab91c61d02a6b364d59 ≤ v < 393397fbdcad7396639d7077c33f86169184ba99 | CVEProject cvelistV5 (CNA) |
References and advisories
2Details
- Published
- 2024-11-09
- Last updated
- 2026-08-05
- State
- Published
- Assigner (CNA)
- Linux
Exploit prediction (EPSS)
SSVC assessment (CISA)
- Automatable
- No
- Exploitation
- None
- Technical impact
- Partial
Weaknesses (CWE)
- —