{
  "id": "CVE-2026-46253",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-46253",
  "published_at": "2026-06-03T15:49:49.864Z",
  "title": "pstore/ram: fix buffer overflow in persistent_ram_save_old()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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 -\u003e ramoops_get_next_prz\nfor PSTORE_TYPE_DMESG records).\n\nCurrently, the function only allocates prz-\u003eold_log when it is NULL,\nbut it unconditionally updates prz-\u003eold_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 \u003e= 0)\n  3. Oops happens (non-fatal, system continues)\n  4. pstore_dump() writes oops via ramoops_pstore_write() size Y (\u003eX)\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 \u003e 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 \u003e= 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.",
  "cwe": "CWE-122",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "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:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 58bda5a1d1ee98254383ef34f76b2c35140513ea",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 06d2c8bd108cea503f6f6e13e47495ed1085275f",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 2fa9a047c6a50ec80c3890dd623b85e237f0d1fd",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c cff0ef043e16feb5a02307c8f9d0117a96c5587c",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 9a6fc69a570c0780834246d52c856cc3dbc2605f",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 4f73486ca822305c1cf5b8ebc0b53a6ab3801a81",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 7cfe964e61c0ab667abd5f5b68e0acbf783efa4f",
          "\u003e= 201e4aca5aa179e6c69a4dcd36a3562e56b8d670, \u003c 5669645c052f235726a85f443769b6fc02f66762"
        ],
        "fixed_in": [
          "58bda5a1d1ee98254383ef34f76b2c35140513ea",
          "06d2c8bd108cea503f6f6e13e47495ed1085275f",
          "2fa9a047c6a50ec80c3890dd623b85e237f0d1fd",
          "cff0ef043e16feb5a02307c8f9d0117a96c5587c",
          "9a6fc69a570c0780834246d52c856cc3dbc2605f",
          "4f73486ca822305c1cf5b8ebc0b53a6ab3801a81",
          "7cfe964e61c0ab667abd5f5b68e0acbf783efa4f",
          "5669645c052f235726a85f443769b6fc02f66762"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "3.5"
        ],
        "fixed_in": [
          "0",
          "5.10.252",
          "5.15.202",
          "6.1.165",
          "6.6.128",
          "6.12.75",
          "6.18.14",
          "6.19.4",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 58bda5a1d1ee98254383ef34f76b2c35140513ea or 06d2c8bd108cea503f6f6e13e47495ed1085275f or 2fa9a047c6a50ec80c3890dd623b85e237f0d1fd or cff0ef043e16feb5a02307c8f9d0117a96c5587c or 9a6fc69a570c0780834246d52c856cc3dbc2605f or 4f73486ca822305c1cf5b8ebc0b53a6ab3801a81 or 7cfe964e61c0ab667abd5f5b68e0acbf783efa4f or 5669645c052f235726a85f443769b6fc02f66762 or later.",
      "Upgrade Linux to 0 or 5.10.252 or 5.15.202 or 6.1.165 or 6.6.128 or 6.12.75 or 6.18.14 or 6.19.4 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
