CyberSecBulletin
CVE-2023-52748NVD status: Analyzed

Linux: Out-of-bounds Write

CVE-2023-52748 is a high-severity out-of-bounds write 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 c041f5ddef00c731c541e00bc8ae97b8c84c682f, e4088d7d8f1123006d46a42edf51b8c960a58ef9, 526dd7540a09ecf87b5f54f3ab4e0a2528f25a79 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 c041f5ddef00c731c541e00bc8ae97b8c84c682f or e4088d7d8f1123006d46a42edf51b8c960a58ef9 or 526dd7540a09ecf87b5f54f3ab4e0a2528f25a79 or 6fca08fd3085253b48fcb1bd243a0a5e18821a00, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 5.10.202 or 5.15.140 or 6.1.64 or 6.5.13, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, c041f5ddef00c731c541e00bc8ae97b8c84c682f; 31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, e4088d7d8f1123006d46a42edf51b8c960a58ef9; 31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, 526dd7540a09ecf87b5f54f3ab4e0a2528f25a79; 31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, 6fca08fd3085253b48fcb1bd243a0a5e18821a00; 31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, 3eebe636cac53886bd5d1cdd55e082ec9e84983f; 31083031709eea6530f0551d59eecdb2e68265ef up to, but not including, e0d4e8acb3789c5a8651061fbab62ca24a45c063; 5.10c041f5ddef00c731c541e00bc8ae97b8c84c682f, e4088d7d8f1123006d46a42edf51b8c960a58ef9, 526dd7540a09ecf87b5f54f3ab4e0a2528f25a79, 6fca08fd3085253b48fcb1bd243a0a5e18821a00, 3eebe636cac53886bd5d1cdd55e082ec9e84983f, e0d4e8acb3789c5a8651061fbab62ca24a45c063
LinuxLinux Kernel5.10 up to, but not including, 5.10.202; 5.11 up to, but not including, 5.15.140; 5.16 up to, but not including, 6.1.64; 6.2 up to, but not including, 6.5.13; 6.6 up to, but not including, 6.6.35.10.202, 5.15.140, 6.1.64, 6.5.13, 6.6.3

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.

Official description

In the Linux kernel, the following vulnerability has been resolved: f2fs: avoid format-overflow warning With gcc and W=1 option, there's a warning like this: fs/f2fs/compress.c: In function ‘f2fs_init_page_array_cache’: fs/f2fs/compress.c:1984:47: error: ‘%u’ directive writing between 1 and 7 bytes into a region of size between 5 and 8 [-Werror=format-overflow=] 1984 | sprintf(slab_name, "f2fs_page_array_entry-%u:%u", MAJOR(dev), MINOR(dev)); | ^~ String "f2fs_page_array_entry-%u:%u" can up to 35. The first "%u" can up to 4 and the second "%u" can up to 7, so total size is "24 + 4 + 7 = 35". slab_name's size should be 35 rather than 32.

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

The underlying weakness: Out-of-bounds Write

The product writes data past the end, or before the beginning, of the intended buffer.

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 Out-of-bounds Write vulnerabilities (CWE-787)

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 Out-of-bounds Write vulnerabilities

Spotted an error? Tell us.