CVE-2024-50253: bpf: Check the validity of nr_words in bpf_iter_bits_new()
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.
Security readout for executives and security teams
Plain-English summary
A low-privileged local user may trigger memory corruption in affected Linux kernels through a BPF iterator function. Successful exploitation could compromise confidentiality, integrity, and availability. This is not remotely exploitable according to the supplied CVSS vector.
Executive priority
Prioritize remediation on shared or multi-user Linux systems. Internet-facing status alone does not increase direct reachability because exploitation is local, but compromised accounts or hosted workloads could provide the required foothold.
Technical view
bpf_iter_bits_new() insufficiently validated nr_words. A large value could overflow the nr_bits multiplication, producing inconsistent sizes and causing stack corruption during bpf_probe_read_kernel_common(). The fix limits nr_words to 511, validates allocation size, and returns E2BIG for oversized requests.
Likely exposure
Exposure requires local access with low privileges and a vulnerable Linux kernel. The bundle identifies affected releases within the 6.11–6.12 range, but its version records do not clearly establish every fixed boundary. Confirm exact exposure against kernel or distribution advisories.
Exploitation context
The supplied record does not establish active exploitation, and the CVE is not listed as KEV in the bundle. The local, low-complexity CVSS assessment indicates meaningful post-access risk, but no public exploit evidence is provided.
Researcher notes
The reported trigger uses nr_words large enough to overflow nr_bits while retaining a very large nr_bytes value. The correction combines a 511-word cap with bpf_mem_alloc_check_size(), aligning validation with allocator constraints. The supplied sources do not document exploit reliability or affected distribution packages.
Mitigation direction
Update to a vendor-supported kernel containing the referenced stable fix.
Follow the Linux distribution's advisory for exact fixed package versions.
Reboot affected systems after installing the corrected kernel.
Prioritize multi-user systems where untrusted users can access BPF functionality.
Validation and detection
Record running kernel versions across Linux systems.
Compare installed packages with distribution-specific fixed-version guidance.
Verify the active kernel changed after patching and rebooting.
Confirm the applied source includes nr_words and allocation-size validation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-50253 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.