CVE-2024-26883

bpf: Fix stackmap overflow check on 32-bit arches

HIGH
7.8
CVSS Score
Published: April 17, 2024 at 10:27 AM UTC
Updated: October 15, 2026 at 01:17 AM UTC
3 products affected across 3 vendorsLinux KernelDebian LinuxSIMATIC S7-1500 TM MFP

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix stackmap overflow check on 32-bit arches The stackmap 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. The commit in the fixes tag actually attempted to fix this, but the fix did not account for the UB, so the fix only works on CPUs where an overflow does result in a neat truncation to zero, which is not guaranteed. Checking the value before rounding does not have this problem.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.14.222 ≤ v < 4.154.19.177 ≤ v < 4.19.3114.9.258 ≤ v < 4.105.10.17 ≤ v < 5.10.2145.11 ≤ v < 5.15.1535.16 ≤ v < 6.1.835.4.99 ≤ v < 5.4.2736.2 ≤ v < 6.6.236.7 ≤ v < 6.7.116.8 ≤ v < 6.8.2253150830a012adfccf90afcebae8fda5b05a80f4.14.2224.19.1774.9.2585.10.175.115.4.996183f4d3a0a2ad230511987c6c362ca43ec0055f63c722dd9d285d877e6fd499e753d6224f4c46766107351731ae223ebf60ca22bdfeb47ce6acc87e3a6b820535eb395784060ae26c5af579528fa08032bf2af9ce26b3a362b9711d15f626ab946a74
Vendor states this is fixed in 0971126c8164abe2004b8536b49690a0d6005b0a (fixed)
Vendor states this is fixed in 15641007df0f0d35fa28742b25c2a7db9dcd6895 (fixed)
Vendor states this is fixed in 21e5fa4688e1a4d3db6b72216231b24232f75c1d (fixed)
Vendor states this is fixed in 43f798b9036491fb014b55dd61c4c5c3193267d0 (fixed)
Vendor states this is fixed in 7070b274c7866a4c5036f8d54fcaf315c64ac33a (fixed)
Vendor states this is fixed in 7a4b21250bf79eef26543d35bd390448646c536b (fixed)
Vendor states this is fixed in ca1f06e72dec41ae4f76e7b1a8a97265447b46ae (fixed)
Vendor states this is fixed in d0e214acc59145ce25113f617311aa79dda39cb3 (fixed)
Vendor states this is fixed in f06899582ccee09bd85d0696290e3eaca9aa042d (fixed)
Affected range stops below 4.10, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.15, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 4.19.311 (unaffected)
Vendor states this is fixed in 5.10.214 (unaffected)
Vendor states this is fixed in 5.11 (unaffected)
Vendor states this is fixed in 5.15.153 (unaffected)
Vendor states this is fixed in 5.4.273 (unaffected)
Vendor states this is fixed in 6.1.83 (unaffected)
Vendor states this is fixed in 6.6.23 (unaffected)
Vendor states this is fixed in 6.7.11 (unaffected)
Vendor states this is fixed in 6.8.2 (unaffected)
Vendor states this is fixed in 6.9 (unaffected)

References (12)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0971126c8164abe2004b8536b49690a0d6005b0a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/15641007df0f0d35fa28742b25c2a7db9dcd6895
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/21e5fa4688e1a4d3db6b72216231b24232f75c1d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/43f798b9036491fb014b55dd61c4c5c3193267d0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7070b274c7866a4c5036f8d54fcaf315c64ac33a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7a4b21250bf79eef26543d35bd390448646c536b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ca1f06e72dec41ae4f76e7b1a8a97265447b46ae
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d0e214acc59145ce25113f617311aa79dda39cb3

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-119

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card