CVE-2024-50253

published 9 Nov 2024 · updated 5 Aug 2026

bpf: Check the validity of nr_words in bpf_iter_bits_new()

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 393397fbdcad7396639d7077c33f86169184ba99 and Kernel c9539e09c67880ecd88b51188c346a2cc078b06c.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=6.11, >=4665415975b0827e9646cab91c61d02a6b364d59 <393397fbdcad7396639d7077c33f86169184ba99, >=4665415975b0827e9646cab91c61d02a6b364d59 <c9539e09c67880ecd88b51188c346a2cc078b06c393397fbdcad7396639d7077c33f86169184ba99, c9539e09c67880ecd88b51188c346a2cc078b06c

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-50253 severity on Zeptric[![CVE-2024-50253](https://zeptric.io/badge/cve/CVE-2024-50253.svg)](https://zeptric.io/cve/CVE-2024-50253)