High severity · published Apr 17, 2024
CVE-2024-26885
bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
7.8
CVSS
0.2%
EPSS
No
On KEV
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix DEVMAP_HASH overflow check on 32-bit arches
The devmap code allocates a number hash buckets equal to the next power
of two of the max_entries value provided when creating the map. When
rounding up to the next power of two, the 32-bit variable storing the
number of buckets can overflow, and the code checks for overflow by
checking if the truncated 32-bit value is equal to 0. However, on 32-bit
arches the rounding up itself can overflow mid-way through, because it
ends up doing a left-shift of 32 bits on an unsigned long value. If the
size of an unsigned long is four bytes, this is undefined behaviour, so
there is no guarantee that we'll end up with a nice and tidy 0-value at
the end.
Syzbot managed to turn this into a crash on arm32 by creating a
DEVMAP_HASH with max_entries > 0x80000000 and then trying to update it.
Fix this by moving the overflow check to before the rounding up
operation.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 16% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Kernel · Linux
5.4 before 5.10.214; 5.11 before 5.15.153; 5.16 before 6.1.83; 6.2 before 6.6.23; 6.7 before 6.7.11; 6.8 before 6.8.2 · source: NVD, CISA
LI
Linux · Linux
6f9d451ab1a33728adb72d7ff66a7b374d665176 before 1f5e352b9088211fa5eb4e1639cd365f4f7d2f65; 6f9d451ab1a33728adb72d7ff66a7b374d665176 before 4b81a9f92b3676cb74b907a7a209b3d15bd9a7f9; 6f9d451ab1a33728adb72d7ff66a7b374d665176 before c826502bed93970f2fd488918a7b8d5f1d30e2e3; 6f9d451ab1a33728adb72d7ff66a7b374d665176 before edf7990baa48de5097daa9ac02e06cb4c798a737; 6f9d451ab1a33728adb72d7ff66a7b374d665176 before 250051acc21f9d4c5c595e4fcb55986ea08c4691; 6f9d451ab1a33728adb72d7ff66a7b374d665176 before 22079b3a423382335f47d9ed32114e6c9fe88d7c; +3 more · source: vendor
SS
SIMATIC S7-1500 TM MFP - GNU/Linux subsystem · Siemens
before V1.1.1 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-26885
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-26885
git.kernel.org
https://git.kernel.org/stable/c/1f5e352b9088211fa5eb4e1639cd365f4f7d2f65
Patch
https://git.kernel.org/stable/c/22079b3a423382335f47d9ed32114e6c9fe88d7c
Patch
https://git.kernel.org/stable/c/250051acc21f9d4c5c595e4fcb55986ea08c4691
Patch
https://git.kernel.org/stable/c/281d464a34f540de166cee74b723e97ac2515ec3
git.kernel.org
https://git.kernel.org/stable/c/4b81a9f92b3676cb74b907a7a209b3d15bd9a7f9
Patch
https://git.kernel.org/stable/c/c826502bed93970f2fd488918a7b8d5f1d30e2e3
More from Kernel
9.8
CVE-2025-39682
tls: fix handling of zero-length records on the rx_list
8.8
CVE-2026-53266
netfilter: bridge: make ebt_snat ARP rewrite writable
8.8
CVE-2013-6282
Linux Kernel Improper Input Validation Vulnerability
8.4
CVE-2022-0185
Linux Kernel Heap-Based Buffer Overflow Vulnerability
8.4
CVE-2013-2094
Linux Kernel Privilege Escalation Vulnerability
