CyberSecBulletin
CVE-2023-52464NVD status: Modified

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

CVE-2023-52464 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 71c17ee02538802ceafc830f0736aa35b564e601, 5da3b6e7196f0b4f3728e4e25eb20233a9ddfaf6, 6aa7865ba7ff7f0ede0035180fb3b9400ceb405a 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.27% 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 71c17ee02538802ceafc830f0736aa35b564e601 or 5da3b6e7196f0b4f3728e4e25eb20233a9ddfaf6 or 6aa7865ba7ff7f0ede0035180fb3b9400ceb405a or 700cf4bead80fac994dcc43ae1ca5d86d8959b21, whichever matches your release line, or a later version.
  2. Update SIMATIC S7-1500 CPU 1518-4 PN/DP MFP to V3.1.5 or a later version.
  3. Update SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP to V3.1.5 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 71c17ee02538802ceafc830f0736aa35b564e601; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 5da3b6e7196f0b4f3728e4e25eb20233a9ddfaf6; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 6aa7865ba7ff7f0ede0035180fb3b9400ceb405a; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 700cf4bead80fac994dcc43ae1ca5d86d8959b21; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 9dbac9fdae6e3b411fc4c3fca3bf48f70609c398; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, e1c86511241588efffaa49556196f09a498d5057; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 426fae93c01dffa379225eb2bd4d3cdc42c6eec5; 41003396f932d7f027725c7acebb6a7caa41dc3e up to, but not including, 475c58e1a471e9b873e3e39958c64a2d278275c8; and 1 more ranges71c17ee02538802ceafc830f0736aa35b564e601, 5da3b6e7196f0b4f3728e4e25eb20233a9ddfaf6, 6aa7865ba7ff7f0ede0035180fb3b9400ceb405a, 700cf4bead80fac994dcc43ae1ca5d86d8959b21, 9dbac9fdae6e3b411fc4c3fca3bf48f70609c398, e1c86511241588efffaa49556196f09a498d5057
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFPV3.1.0 up to, but not including, V3.1.5V3.1.5
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFPV3.1.0 up to, but not including, V3.1.5V3.1.5
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFPV3.1.0 up to, but not including, V3.1.5V3.1.5
LinuxLinux Kernel4.12.0 up to, but not including, 4.19.306; 4.20.0 up to, but not including, 5.4.268; 5.5.0 up to, but not including, 5.10.209; 5.11.0 up to, but not including, 5.15.148; 5.16.0 up to, but not including, 6.1.75; 6.2.0 up to, but not including, 6.6.14; 6.7.0 up to, but not including, 6.7.24.19.306, 5.4.268, 5.10.209, 5.15.148, 6.1.75, 6.6.14

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: EDAC/thunderx: Fix possible out-of-bounds string access Enabling -Wstringop-overflow globally exposes a warning for a common bug in the usage of strncat(): drivers/edac/thunderx_edac.c: In function 'thunderx_ocx_com_threaded_isr': drivers/edac/thunderx_edac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=] 1136 | strncat(msg, other, OCX_MESSAGE_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 1145 | strncat(msg, other, OCX_MESSAGE_SIZE); ... 1150 | strncat(msg, other, OCX_MESSAGE_SIZE); ... Apparently the author of this driver expected strncat() to behave the way that strlcat() does, which uses the size of the destination buffer as its third argument rather than the length of the source buffer. The result is that there is no check on the size of the allocated buffer. Change it to strlcat(). [ bp: Trim compiler output, fixup commit message. ]

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.