FKIE_CVE-2026-46253
Vulnerability from fkie_nvd - Published: 2026-06-03 18:16 - Updated: 2026-07-22 20:10
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved:
pstore/ram: fix buffer overflow in persistent_ram_save_old()
persistent_ram_save_old() can be called multiple times for the same
persistent_ram_zone (e.g., via ramoops_pstore_read -> ramoops_get_next_prz
for PSTORE_TYPE_DMESG records).
Currently, the function only allocates prz->old_log when it is NULL,
but it unconditionally updates prz->old_log_size to the current buffer
size and then performs memcpy_fromio() using this new size. If the
buffer size has grown since the first allocation (which can happen
across different kernel boot cycles), this leads to:
1. A heap buffer overflow (OOB write) in the memcpy_fromio() calls
2. A subsequent OOB read when ramoops_pstore_read() accesses the buffer
using the incorrect (larger) old_log_size
The KASAN splat would look similar to:
BUG: KASAN: slab-out-of-bounds in ramoops_pstore_read+0x...
Read of size N at addr ... by task ...
The conditions are likely extremely hard to hit:
0. Crash with a ramoops write of less-than-record-max-size bytes.
1. Reboot: ramoops registers, pstore_get_records(0) reads old crash,
allocates old_log with size X
2. Crash handler registered, timer started (if pstore_update_ms >= 0)
3. Oops happens (non-fatal, system continues)
4. pstore_dump() writes oops via ramoops_pstore_write() size Y (>X)
5. pstore_new_entry = 1, pstore_timer_kick() called
6. System continues running (not a panic oops)
7. Timer fires after pstore_update_ms milliseconds
8. pstore_timefunc() → schedule_work() → pstore_dowork() → pstore_get_records(1)
9. ramoops_get_next_prz() → persistent_ram_save_old()
10. buffer_size() returns Y, but old_log is X bytes
11. Y > X: memcpy_fromio() overflows heap
Requirements:
- a prior crash record exists that did not fill the record size
(almost impossible since the crash handler writes as much as it
can possibly fit into the record, capped by max record size and
the kmsg buffer almost always exceeds the max record size)
- pstore_update_ms >= 0 (disabled by default)
- Non-fatal oops (system survives)
Free and reallocate the buffer when the new size differs from the
previously allocated size. This ensures old_log always has sufficient
space for the data being copied.
References
Impacted products
| Vendor | Product | Version | |
|---|---|---|---|
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | 3.5 | |
| linux | linux_kernel | 3.5 | |
| linux | linux_kernel | 3.5 | |
| linux | linux_kernel | 3.5 | |
| linux | linux_kernel | 3.5 |
{
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"fs/pstore/ram_core.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "58bda5a1d1ee98254383ef34f76b2c35140513ea",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "06d2c8bd108cea503f6f6e13e47495ed1085275f",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "2fa9a047c6a50ec80c3890dd623b85e237f0d1fd",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "cff0ef043e16feb5a02307c8f9d0117a96c5587c",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "9a6fc69a570c0780834246d52c856cc3dbc2605f",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "4f73486ca822305c1cf5b8ebc0b53a6ab3801a81",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "7cfe964e61c0ab667abd5f5b68e0acbf783efa4f",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
},
{
"lessThan": "5669645c052f235726a85f443769b6fc02f66762",
"status": "affected",
"version": "201e4aca5aa179e6c69a4dcd36a3562e56b8d670",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"fs/pstore/ram_core.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "3.5"
},
{
"lessThan": "3.5",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.10.*",
"status": "unaffected",
"version": "5.10.252",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.15.*",
"status": "unaffected",
"version": "5.15.202",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.165",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"version": "6.6.128",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.12.*",
"status": "unaffected",
"version": "6.12.75",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.18.*",
"status": "unaffected",
"version": "6.18.14",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.19.*",
"status": "unaffected",
"version": "6.19.4",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.0",
"versionType": "original_commit_for_fix"
}
]
}
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"configurations": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "78DB234D-033A-4925-A93F-12808A20B8F3",
"versionEndExcluding": "5.10.252",
"versionStartIncluding": "3.5.1",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "4002FC2B-1456-4666-B240-0EBF590C4671",
"versionEndExcluding": "5.15.202",
"versionStartIncluding": "5.11",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "797C7F46-D0BE-4FB8-A502-C5EF8E6B6654",
"versionEndExcluding": "6.1.165",
"versionStartIncluding": "5.16",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "851E9353-6C09-4CC9-877E-E09DB164A3C2",
"versionEndExcluding": "6.6.128",
"versionStartIncluding": "6.2",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "BCE16369-98ED-41CF-8995-DFDC10B288D2",
"versionEndExcluding": "6.12.75",
"versionStartIncluding": "6.7",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "BF463CB7-1F58-4607-B847-77ED23E4B9B7",
"versionEndExcluding": "6.18.14",
"versionStartIncluding": "6.13",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "672A3E79-EC03-479D-8503-361DFBDC8092",
"versionEndExcluding": "6.19.4",
"versionStartIncluding": "6.19",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:3.5:-:*:*:*:*:*:*",
"matchCriteriaId": "71555F5B-DEB2-417A-8E33-90276DD2EFB8",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:3.5:rc4:*:*:*:*:*:*",
"matchCriteriaId": "2D13A502-2E47-4C09-A235-BA11BB91C1DE",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:3.5:rc5:*:*:*:*:*:*",
"matchCriteriaId": "7F0CC423-9BE8-4B1C-8179-E3E24693BEAA",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:3.5:rc6:*:*:*:*:*:*",
"matchCriteriaId": "F9893E78-1974-4ED0-B4DB-CD2F9161E61A",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:3.5:rc7:*:*:*:*:*:*",
"matchCriteriaId": "1E1655C7-B886-47A0-AF2B-B54A25AA91FF",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"cveTags": [],
"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 -\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() \u2192 schedule_work() \u2192 pstore_dowork() \u2192 pstore_get_records(1)\n 9. ramoops_get_next_prz() \u2192 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."
},
{
"lang": "es",
"value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\npstore/ram: corrige desbordamiento de b\u00fafer en persistent_ram_save_old()\n\npersistent_ram_save_old() puede ser llamada m\u00faltiples veces para la misma persistent_ram_zone (por ejemplo, a trav\u00e9s de ramoops_pstore_read -\u003e ramoops_get_next_prz para registros PSTORE_TYPE_DMESG).\n\nActualmente, la funci\u00f3n solo asigna prz-\u003eold_log cuando es NULL, pero actualiza incondicionalmente prz-\u003eold_log_size al tama\u00f1o de b\u00fafer actual y luego realiza memcpy_fromio() usando este nuevo tama\u00f1o. Si el tama\u00f1o del b\u00fafer ha crecido desde la primera asignaci\u00f3n (lo que puede ocurrir en diferentes ciclos de arranque del kernel), esto lleva a:\n\n1. Un desbordamiento de b\u00fafer de pila (escritura OOB) en las llamadas a memcpy_fromio()\n2. Una lectura OOB posterior cuando ramoops_pstore_read() accede al b\u00fafer usando el old_log_size incorrecto (m\u00e1s grande)\n\nEl splat de KASAN se ver\u00eda similar a:\n BUG: KASAN: slab-out-of-bounds en ramoops_pstore_read+0x...\n Lectura de tama\u00f1o N en la direcci\u00f3n ... por la tarea ...\n\nEs probable que las condiciones sean extremadamente dif\u00edciles de alcanzar:\n\n 0. Fallo con una escritura de ramoops de menos de record-max-size bytes.\n 1. Reinicio: ramoops se registra, pstore_get_records(0) lee el fallo antiguo, asigna old_log con tama\u00f1o X\n 2. Gestor de fallos registrado, temporizador iniciado (si pstore_update_ms \u003e= 0)\n 3. Ocurre un oops (no fatal, el sistema contin\u00faa)\n 4. pstore_dump() escribe el oops a trav\u00e9s de ramoops_pstore_write() tama\u00f1o Y (\u003eX)\n 5. pstore_new_entry = 1, se llama a pstore_timer_kick()\n 6. El sistema contin\u00faa ejecut\u00e1ndose (no es un oops de p\u00e1nico)\n 7. El temporizador se activa despu\u00e9s de pstore_update_ms milisegundos\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() devuelve Y, pero old_log es de X bytes\n 11. Y \u003e X: memcpy_fromio() desborda la pila\n\n Requisitos:\n - existe un registro de fallo anterior que no llen\u00f3 el tama\u00f1o del registro (casi imposible ya que el gestor de fallos escribe tanto como puede caber en el registro, limitado por el tama\u00f1o m\u00e1ximo del registro y el b\u00fafer kmsg casi siempre excede el tama\u00f1o m\u00e1ximo del registro)\n - pstore_update_ms \u003e= 0 (deshabilitado por defecto)\n - Oops no fatal (el sistema sobrevive)\n\nLibera y reasigna el b\u00fafer cuando el nuevo tama\u00f1o difiere del tama\u00f1o previamente asignado. Esto asegura que old_log siempre tenga espacio suficiente para los datos que se est\u00e1n copiando."
}
],
"id": "CVE-2026-46253",
"lastModified": "2026-07-22T20:10:00.127",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 7.8,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"exploitabilityScore": 1.8,
"impactScore": 5.9,
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"type": "Secondary"
}
]
},
"published": "2026-06-03T18:16:26.170",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/06d2c8bd108cea503f6f6e13e47495ed1085275f"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/2fa9a047c6a50ec80c3890dd623b85e237f0d1fd"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/4f73486ca822305c1cf5b8ebc0b53a6ab3801a81"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/5669645c052f235726a85f443769b6fc02f66762"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/58bda5a1d1ee98254383ef34f76b2c35140513ea"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/7cfe964e61c0ab667abd5f5b68e0acbf783efa4f"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/9a6fc69a570c0780834246d52c856cc3dbc2605f"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/cff0ef043e16feb5a02307c8f9d0117a96c5587c"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Analyzed",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-787"
}
],
"source": "nvd@nist.gov",
"type": "Primary"
}
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
Loading…
Loading…