CVE-2026-46253
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
03/06/2026
Last modified:
22/07/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
pstore/ram: fix buffer overflow in persistent_ram_save_old()<br />
<br />
persistent_ram_save_old() can be called multiple times for the same<br />
persistent_ram_zone (e.g., via ramoops_pstore_read -> ramoops_get_next_prz<br />
for PSTORE_TYPE_DMESG records).<br />
<br />
Currently, the function only allocates prz->old_log when it is NULL,<br />
but it unconditionally updates prz->old_log_size to the current buffer<br />
size and then performs memcpy_fromio() using this new size. If the<br />
buffer size has grown since the first allocation (which can happen<br />
across different kernel boot cycles), this leads to:<br />
<br />
1. A heap buffer overflow (OOB write) in the memcpy_fromio() calls<br />
2. A subsequent OOB read when ramoops_pstore_read() accesses the buffer<br />
using the incorrect (larger) old_log_size<br />
<br />
The KASAN splat would look similar to:<br />
BUG: KASAN: slab-out-of-bounds in ramoops_pstore_read+0x...<br />
Read of size N at addr ... by task ...<br />
<br />
The conditions are likely extremely hard to hit:<br />
<br />
0. Crash with a ramoops write of less-than-record-max-size bytes.<br />
1. Reboot: ramoops registers, pstore_get_records(0) reads old crash,<br />
allocates old_log with size X<br />
2. Crash handler registered, timer started (if pstore_update_ms >= 0)<br />
3. Oops happens (non-fatal, system continues)<br />
4. pstore_dump() writes oops via ramoops_pstore_write() size Y (>X)<br />
5. pstore_new_entry = 1, pstore_timer_kick() called<br />
6. System continues running (not a panic oops)<br />
7. Timer fires after pstore_update_ms milliseconds<br />
8. pstore_timefunc() → schedule_work() → pstore_dowork() → pstore_get_records(1)<br />
9. ramoops_get_next_prz() → persistent_ram_save_old()<br />
10. buffer_size() returns Y, but old_log is X bytes<br />
11. Y > X: memcpy_fromio() overflows heap<br />
<br />
Requirements:<br />
- a prior crash record exists that did not fill the record size<br />
(almost impossible since the crash handler writes as much as it<br />
can possibly fit into the record, capped by max record size and<br />
the kmsg buffer almost always exceeds the max record size)<br />
- pstore_update_ms >= 0 (disabled by default)<br />
- Non-fatal oops (system survives)<br />
<br />
Free and reallocate the buffer when the new size differs from the<br />
previously allocated size. This ensures old_log always has sufficient<br />
space for the data being copied.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.5.1 (including) | 5.10.252 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.202 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.165 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.128 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.75 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.18.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (including) | 6.19.4 (excluding) |
| cpe:2.3:o:linux:linux_kernel:3.5:-:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:3.5:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:3.5:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:3.5:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:3.5:rc7:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/06d2c8bd108cea503f6f6e13e47495ed1085275f
- https://git.kernel.org/stable/c/2fa9a047c6a50ec80c3890dd623b85e237f0d1fd
- https://git.kernel.org/stable/c/4f73486ca822305c1cf5b8ebc0b53a6ab3801a81
- https://git.kernel.org/stable/c/5669645c052f235726a85f443769b6fc02f66762
- https://git.kernel.org/stable/c/58bda5a1d1ee98254383ef34f76b2c35140513ea
- https://git.kernel.org/stable/c/7cfe964e61c0ab667abd5f5b68e0acbf783efa4f
- https://git.kernel.org/stable/c/9a6fc69a570c0780834246d52c856cc3dbc2605f
- https://git.kernel.org/stable/c/cff0ef043e16feb5a02307c8f9d0117a96c5587c



