CVE-2024-50253

bpf: Check the validity of nr_words in bpf_iter_bits_new()

MEDIUM
5.5
CVSS Score
Published: November 9, 2024 at 10:15 AM UTC
Updated: August 5, 2026 at 12:05 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.11 ≤ v < 6.11.76.11 ≤ v < 6.124665415975b0827e9646cab91c61d02a6b364d596.12 rc16.12 rc26.12 rc36.12 rc46.12 rc5
Vendor states this is fixed in 393397fbdcad7396639d7077c33f86169184ba99 (fixed)
Vendor states this is fixed in c9539e09c67880ecd88b51188c346a2cc078b06c (fixed)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.11.7 (unaffected)
Vendor states this is fixed in 6.12 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/393397fbdcad7396639d7077c33f86169184ba99
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c9539e09c67880ecd88b51188c346a2cc078b06c

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.5MEDIUMCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card