Linux: Out-of-bounds Write
CVE-2023-53331 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 89312657337e6e03ad6e9ea1a462bd9c158c85c8, c807ccdd812d18985860504b503899f3140a9549, e972231db29b5d1dccc13bf9d5ba55b6979a69ed 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.16% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 89312657337e6e03ad6e9ea1a462bd9c158c85c8 or c807ccdd812d18985860504b503899f3140a9549 or e972231db29b5d1dccc13bf9d5ba55b6979a69ed or dc2f60de9a7d3efd982440117dab5579898d808c, whichever matches your release line, or a later version.
- Update Linux Kernel to 3.19 or 4.5 or 4.10 or 4.14.326, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | e1e3a46706bd4037e8b7407dc660ae6e05b8ac56 up to, but not including, 89312657337e6e03ad6e9ea1a462bd9c158c85c8; 265242d82a3c6a8bd9120d06b4801f8d7ae9a346 up to, but not including, c807ccdd812d18985860504b503899f3140a9549; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, e972231db29b5d1dccc13bf9d5ba55b6979a69ed; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, dc2f60de9a7d3efd982440117dab5579898d808c; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, fedecaeef88899d940b69368c996e8b3b0b8650d; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, e95d7a8a6edd14f8fab44c777dd7281db91f6ae2; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, f77990358628b01bdc03752126ff5f716ea37615; 30696378f68a9e3dad6bfe55938b112e72af00c2 up to, but not including, 25fb4e3402d46f425ec135ef6f09792a4c1b3003; and 12 more ranges | 89312657337e6e03ad6e9ea1a462bd9c158c85c8, c807ccdd812d18985860504b503899f3140a9549, e972231db29b5d1dccc13bf9d5ba55b6979a69ed, dc2f60de9a7d3efd982440117dab5579898d808c, fedecaeef88899d940b69368c996e8b3b0b8650d, e95d7a8a6edd14f8fab44c777dd7281db91f6ae2 |
| Linux | Linux Kernel | 3.18.133 up to, but not including, 3.19; 4.4.172 up to, but not including, 4.5; 4.9.153 up to, but not including, 4.10; 4.14.96 up to, but not including, 4.14.326; 4.19.18 up to, but not including, 4.19.295; 4.20.5 up to, but not including, 5.4.257; 5.5 up to, but not including, 5.10.195; 5.11 up to, but not including, 5.15.132; and 3 more ranges | 3.19, 4.5, 4.10, 4.14.326, 4.19.295, 5.4.257 |
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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: pstore/ram: Check start of empty przs during init After commit 30696378f68a ("pstore/ram: Do not treat empty buffers as valid"), initialization would assume a prz was valid after seeing that the buffer_size is zero (regardless of the buffer start position). This unchecked start value means it could be outside the bounds of the buffer, leading to future access panics when written to: sysdump_panic_event+0x3b4/0x5b8 atomic_notifier_call_chain+0x54/0x90 panic+0x1c8/0x42c die+0x29c/0x2a8 die_kernel_fault+0x68/0x78 __do_kernel_fault+0x1c4/0x1e0 do_bad_area+0x40/0x100 do_translation_fault+0x68/0x80 do_mem_abort+0x68/0xf8 el1_da+0x1c/0xc0 __raw_writeb+0x38/0x174 __memcpy_toio+0x40/0xac persistent_ram_update+0x44/0x12c persistent_ram_write+0x1a8/0x1b8 ramoops_pstore_write+0x198/0x1e8 pstore_console_write+0x94/0xe0 ... To avoid this, also check if the prz start is 0 during the initialization phase. If not, the next prz sanity check case will discover it (start > size) and zap the buffer back to a sane state. [kees: update commit log with backtrace and clarifications]
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.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/25fb4e3402d46f425ec135ef6f09792a4c1b3003
- git.kernel.org/stable/c/89312657337e6e03ad6e9ea1a462bd9c158c85c8
- git.kernel.org/stable/c/c807ccdd812d18985860504b503899f3140a9549
- git.kernel.org/stable/c/dc2f60de9a7d3efd982440117dab5579898d808c
- git.kernel.org/stable/c/e95d7a8a6edd14f8fab44c777dd7281db91f6ae2
- git.kernel.org/stable/c/e972231db29b5d1dccc13bf9d5ba55b6979a69ed
- git.kernel.org/stable/c/f77990358628b01bdc03752126ff5f716ea37615
- git.kernel.org/stable/c/fe8c3623ab06603eb760444a032d426542212021
- git.kernel.org/stable/c/fedecaeef88899d940b69368c996e8b3b0b8650d
Recent Out-of-bounds Write vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.