Skip to content
7.8 High

CVE-2024-26884 In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The…

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The hashtab code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code. So apply the same fix to hashtab, by moving the overflow check to before the roundup.

Affected products and versions

Product Affected versions Fixed in
Linux 6.9 earliest → < 6.9 6.9
Linux 6.8 earliest → < 6.8.2 6.8.2
Linux 6.7 earliest → < 6.7.11 6.7.11
Linux 6.6 earliest → < 6.6.23 6.6.23
Linux 6.1 earliest → < 6.1.83 6.1.83
Linux 5.15 earliest → < 5.15.153 5.15.153
Linux 5.10 earliest → < 5.10.214 5.10.214
Linux 5.4 earliest → < 5.4.273 5.4.273
Linux 4.19 earliest → < 4.19.311 4.19.311
Show the 2 other branches
Product Affected versions Fixed in
Linux 3.19 No fix stated
SIMATIC S7-1500 TM MFP - GNU/Linux subsystem 1.1 earliest → < 1.1.1 1.1.1
The 18286 CVEs of Linux →
Track this CVE