{"id":"CVE-2024-50253","published":"2024-11-09T10:15:06Z","modified":"2026-08-05T11:42:47Z","title":"bpf: Check the validity of nr_words in bpf_iter_bits_new()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Check the validity of nr_words in bpf_iter_bits_new()\n\nCheck the validity of nr_words in bpf_iter_bits_new(). Without this\ncheck, when multiplication overflow occurs for nr_bits (e.g., when\nnr_words = 0x0400-0001, nr_bits becomes 64), stack corruption may occur\ndue to bpf_probe_read_kernel_common(..., nr_bytes = 0x2000-0008).\n\nFix it by limiting the maximum value of nr_words to 511. The value is\nderived from the current implementation of BPF memory allocator. To\nensure compatibility if the BPF memory allocator's size limitation\nchanges in the future, use the helper bpf_mem_alloc_check_size() to\ncheck whether nr_bytes is too larger. And return -E2BIG instead of\n-ENOMEM for oversized nr_bytes.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00186,"percentile":0.08413,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/c9539e09c67880ecd88b51188c346a2cc078b06c","tags":[]},{"url":"https://git.kernel.org/stable/c/393397fbdcad7396639d7077c33f86169184ba99","tags":[]}],"priority":{"score":7.1,"factors":[{"name":"EPSS percentile","points":1.68},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 4665415975b0827e9646cab91c61d02a6b364d59, < c9539e09c67880ecd88b51188c346a2cc078b06c",">= 4665415975b0827e9646cab91c61d02a6b364d59, < 393397fbdcad7396639d7077c33f86169184ba99"]},{"vendor":"Linux","product":"Linux","versions":["6.11"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-01T20:15:44.047457Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-44755","exploited":false,"provenance":"source"}}