{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46253","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-05-13T15:03:33.107Z","datePublished":"2026-06-03T15:49:49.864Z","dateUpdated":"2026-08-05T12:30:47.049Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:30:47.049Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npstore/ram: fix buffer overflow in persistent_ram_save_old()\n\npersistent_ram_save_old() can be called multiple times for the same\npersistent_ram_zone (e.g., via ramoops_pstore_read -> ramoops_get_next_prz\nfor PSTORE_TYPE_DMESG records).\n\nCurrently, the function only allocates prz->old_log when it is NULL,\nbut it unconditionally updates prz->old_log_size to the current buffer\nsize and then performs memcpy_fromio() using this new size. If the\nbuffer size has grown since the first allocation (which can happen\nacross different kernel boot cycles), this leads to:\n\n1. A heap buffer overflow (OOB write) in the memcpy_fromio() calls\n2. A subsequent OOB read when ramoops_pstore_read() accesses the buffer\n   using the incorrect (larger) old_log_size\n\nThe KASAN splat would look similar to:\n  BUG: KASAN: slab-out-of-bounds in ramoops_pstore_read+0x...\n  Read of size N at addr ... by task ...\n\nThe conditions are likely extremely hard to hit:\n\n  0. Crash with a ramoops write of less-than-record-max-size bytes.\n  1. Reboot: ramoops registers, pstore_get_records(0) reads old crash,\n     allocates old_log with size X\n  2. Crash handler registered, timer started (if pstore_update_ms >= 0)\n  3. Oops happens (non-fatal, system continues)\n  4. pstore_dump() writes oops via ramoops_pstore_write() size Y (>X)\n  5. pstore_new_entry = 1, pstore_timer_kick() called\n  6. System continues running (not a panic oops)\n  7. Timer fires after pstore_update_ms milliseconds\n  8. pstore_timefunc() → schedule_work() → pstore_dowork() → pstore_get_records(1)\n  9. ramoops_get_next_prz() → persistent_ram_save_old()\n 10. buffer_size() returns Y, but old_log is X bytes\n 11. Y > X: memcpy_fromio() overflows heap\n\n  Requirements:\n  - a prior crash record exists that did not fill the record size\n    (almost impossible since the crash handler writes as much as it\n    can possibly fit into the record, capped by max record size and\n    the kmsg buffer almost always exceeds the max record size)\n  - pstore_update_ms >= 0 (disabled by default)\n  - Non-fatal oops (system survives)\n\nFree and reallocate the buffer when the new size differs from the\npreviously allocated size. This ensures old_log always has sufficient\nspace for the data being copied."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The overflow is reached only from in-kernel pstore/ramoops paths (boot init, kmsg-dump oops handling, pstore timer workqueue, or pstore filesystem rescan via mount), not from any network, adjacent-radio, or physical-device interface.\nAC:L - Once ramoops is present (common on Android, ChromeOS, and embedded targets), a local actor who can trigger a survivable oops and influence kmsg volume can drive the size mismatch; the second `persistent_ram_save_old()` call is then triggered deterministically by the pstore update timer or a pstore remount/rescan without depending on uncontrollable memory layout or victim timing.\nPR:L - Exploitation does not require real init-namespace root: an unprivileged local user (or sandboxed code with a kernel bug primitive) can provoke the non-fatal oops that enlarges the persistent RAM record, while the actual overflow fires later in kernel context during automatic pstore rescan or when crash-log collection runs.\nUI:N - No end-user or administrator action is required on the timer-driven path (`pstore_update_ms` enabled): after the oops is logged, the kernel timer/workqueue automatically rescans records and invokes the vulnerable copy without further interaction.\nS:U - The bug corrupts kernel heap memory inside the same kernel security domain; it does not by itself cross a VM, container, or IOMMU boundary to affect a separate authority.\nC:H - The flaw performs an out-of-bounds heap write via `memcpy_fromio()` and then exposes an out-of-bounds read through the inflated `old_log_size` in `ramoops_pstore_read()`, giving memory-corruption primitives that can disclose adjacent kernel heap contents.\nI:H - The out-of-bounds write into a `kvzalloc()`-allocated shadow buffer is classic kernel heap corruption that can be leveraged for arbitrary memory modification and potential control-flow hijack, not merely a bounded data alteration.\nA:H - The overflow is detected as a slab out-of-bounds condition (KASAN splat) and can panic or oops the kernel during the copy or subsequent read, causing complete loss of availability on affected systems."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/pstore/ram_core.c"],"versions":[{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"58bda5a1d1ee98254383ef34f76b2c35140513ea","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"06d2c8bd108cea503f6f6e13e47495ed1085275f","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"2fa9a047c6a50ec80c3890dd623b85e237f0d1fd","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"cff0ef043e16feb5a02307c8f9d0117a96c5587c","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"9a6fc69a570c0780834246d52c856cc3dbc2605f","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"4f73486ca822305c1cf5b8ebc0b53a6ab3801a81","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"7cfe964e61c0ab667abd5f5b68e0acbf783efa4f","status":"affected","versionType":"git"},{"version":"201e4aca5aa179e6c69a4dcd36a3562e56b8d670","lessThan":"5669645c052f235726a85f443769b6fc02f66762","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/pstore/ram_core.c"],"versions":[{"version":"3.5","status":"affected"},{"version":"0","lessThan":"3.5","status":"unaffected","versionType":"semver"},{"version":"5.10.252","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.202","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.165","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.128","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.75","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.14","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"6.19.4","lessThanOrEqual":"6.19.*","status":"unaffected","versionType":"semver"},{"version":"7.0","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.10.252"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.15.202"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.1.165"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.6.128"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.12.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.18.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"7.0"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/58bda5a1d1ee98254383ef34f76b2c35140513ea"},{"url":"https://git.kernel.org/stable/c/06d2c8bd108cea503f6f6e13e47495ed1085275f"},{"url":"https://git.kernel.org/stable/c/2fa9a047c6a50ec80c3890dd623b85e237f0d1fd"},{"url":"https://git.kernel.org/stable/c/cff0ef043e16feb5a02307c8f9d0117a96c5587c"},{"url":"https://git.kernel.org/stable/c/9a6fc69a570c0780834246d52c856cc3dbc2605f"},{"url":"https://git.kernel.org/stable/c/4f73486ca822305c1cf5b8ebc0b53a6ab3801a81"},{"url":"https://git.kernel.org/stable/c/7cfe964e61c0ab667abd5f5b68e0acbf783efa4f"},{"url":"https://git.kernel.org/stable/c/5669645c052f235726a85f443769b6fc02f66762"}],"title":"pstore/ram: fix buffer overflow in persistent_ram_save_old()","x_generator":{"engine":"bippy-1.2.0"}}}}