CyberSecBulletin
CVE-2024-46852NVD status: Modified

Linux: Off-by-one Error

CVE-2024-46852 is a high-severity off-by-one error 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 79cce5e81d20fa9ad553be439d665ac3302d3c95, 84175dc5b2c932266a50c04e5ce342c30f817a2f, eb7fc8b65cea22f9038c52398c8b22849e9620ea 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.21% 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 79cce5e81d20fa9ad553be439d665ac3302d3c95 or 84175dc5b2c932266a50c04e5ce342c30f817a2f or eb7fc8b65cea22f9038c52398c8b22849e9620ea or e79050882b857c37634baedbdcf7c2047c24cbff, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.15.168 or 6.1.111 or 6.6.52 or 6.10.11, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinuxa5d2d29e24be8967ef78a1b1fb2292413e3b3df9 up to, but not including, 79cce5e81d20fa9ad553be439d665ac3302d3c95; a5d2d29e24be8967ef78a1b1fb2292413e3b3df9 up to, but not including, 84175dc5b2c932266a50c04e5ce342c30f817a2f; a5d2d29e24be8967ef78a1b1fb2292413e3b3df9 up to, but not including, eb7fc8b65cea22f9038c52398c8b22849e9620ea; a5d2d29e24be8967ef78a1b1fb2292413e3b3df9 up to, but not including, e79050882b857c37634baedbdcf7c2047c24cbff; a5d2d29e24be8967ef78a1b1fb2292413e3b3df9 up to, but not including, ea5ff5d351b520524019f7ff7f9ce418de2dad87; 5.1179cce5e81d20fa9ad553be439d665ac3302d3c95, 84175dc5b2c932266a50c04e5ce342c30f817a2f, eb7fc8b65cea22f9038c52398c8b22849e9620ea, e79050882b857c37634baedbdcf7c2047c24cbff, ea5ff5d351b520524019f7ff7f9ce418de2dad87
DebianDebian Linux11.0Not stated
LinuxLinux Kernel5.11 up to, but not including, 5.15.168; 5.16 up to, but not including, 6.1.111; 6.2 up to, but not including, 6.6.52; 6.7 up to, but not including, 6.10.11; 6.115.15.168, 6.1.111, 6.6.52, 6.10.11

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: dma-buf: heaps: Fix off-by-one in CMA heap fault handler Until VM_DONTEXPAND was added in commit 1c1914d6e8c6 ("dma-buf: heaps: Don't track CMA dma-buf pages under RssFile") it was possible to obtain a mapping larger than the buffer size via mremap and bypass the overflow check in dma_buf_mmap_internal. When using such a mapping to attempt to fault past the end of the buffer, the CMA heap fault handler also checks the fault offset against the buffer size, but gets the boundary wrong by 1. Fix the boundary check so that we don't read off the end of the pages array and insert an arbitrary page in the mapping.

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

The underlying weakness: Off-by-one Error

A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

How developers prevent this class of flaw

  • When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().

More Off-by-one Error vulnerabilities (CWE-193)

Timeline

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

References

Third-party and government advisories

Recent Off-by-one Error vulnerabilities

Spotted an error? Tell us.