CVE-2024-50253

CVE-2024-50253

High · published November 9, 2024

CVSS v3.1
7.8
EPSS
0%
Percentile
7.8
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00186 · 7.8th percentile
Published
2024-11-09T16:15Z
Affected products (6)
ProductVersionsFixed in
linux/linux_kernel≥ 6.11, < 6.11.76.11.7
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
References (2)
EPSS history
Timeline
  • 09 NOV 10:15Z
    bpf: Check the validity of nr_words in bpf_iter_bits_new()
    cvelistv5