CyberSecBulletin
CVE-2024-26883NVD status: Modified

Linux: Improper Restriction of Operations within the Bounds of a Memory Buffer

CVE-2024-26883 is a high-severity improper restriction of operations within the bounds of a memory buffer vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions d0e214acc59145ce25113f617311aa79dda39cb3, 21e5fa4688e1a4d3db6b72216231b24232f75c1d, 15641007df0f0d35fa28742b25c2a7db9dcd6895 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.25% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to d0e214acc59145ce25113f617311aa79dda39cb3 or 21e5fa4688e1a4d3db6b72216231b24232f75c1d or 15641007df0f0d35fa28742b25c2a7db9dcd6895 or ca1f06e72dec41ae4f76e7b1a8a97265447b46ae, whichever matches your release line, or a later version.
  2. Update SIMATIC S7-1500 TM MFP - GNU/Linux subsystem to V1.1.1 or a later version.
  3. Update Linux Kernel to 4.10 or 4.15 or 4.19.311 or 5.4.273, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux063c722dd9d285d877e6fd499e753d6224f4c046 up to, but not including, d0e214acc59145ce25113f617311aa79dda39cb3; 7e3a6b820535eb395784060ae26c5af579528fa0 up to, but not including, 21e5fa4688e1a4d3db6b72216231b24232f75c1d; 8032bf2af9ce26b3a362b9711d15f626ab946a74 up to, but not including, 15641007df0f0d35fa28742b25c2a7db9dcd6895; 6183f4d3a0a2ad230511987c6c362ca43ec0055f up to, but not including, ca1f06e72dec41ae4f76e7b1a8a97265447b46ae; 6183f4d3a0a2ad230511987c6c362ca43ec0055f up to, but not including, f06899582ccee09bd85d0696290e3eaca9aa042d; 6183f4d3a0a2ad230511987c6c362ca43ec0055f up to, but not including, 7070b274c7866a4c5036f8d54fcaf315c64ac33a; 6183f4d3a0a2ad230511987c6c362ca43ec0055f up to, but not including, 43f798b9036491fb014b55dd61c4c5c3193267d0; 6183f4d3a0a2ad230511987c6c362ca43ec0055f up to, but not including, 0971126c8164abe2004b8536b49690a0d6005b0a; and 9 more rangesd0e214acc59145ce25113f617311aa79dda39cb3, 21e5fa4688e1a4d3db6b72216231b24232f75c1d, 15641007df0f0d35fa28742b25c2a7db9dcd6895, ca1f06e72dec41ae4f76e7b1a8a97265447b46ae, f06899582ccee09bd85d0696290e3eaca9aa042d, 7070b274c7866a4c5036f8d54fcaf315c64ac33a
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystembefore V1.1.1V1.1.1
DebianDebian Linux10.0Not stated
LinuxLinux Kernel4.9.258 up to, but not including, 4.10; 4.14.222 up to, but not including, 4.15; 4.19.177 up to, but not including, 4.19.311; 5.4.99 up to, but not including, 5.4.273; 5.10.17 up to, but not including, 5.10.214; 5.11 up to, but not including, 5.15.153; 5.16 up to, but not including, 6.1.83; 6.2 up to, but not including, 6.6.23; and 2 more ranges4.10, 4.15, 4.19.311, 5.4.273, 5.10.214, 5.15.153

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

Official 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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Improper Restriction of Operations within the Bounds of a Memory Buffer

The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.

How developers prevent this class of flaw

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega, and the Strsafe.h library from Microsoft. These libraries provide safer versions of overflow-prone string-handling functions.
  • Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.

More Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerabilities (CWE-119)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerabilities

Spotted an error? Tell us.