CVE-2026-139658

pstore: reject persistent RAM zones too small for the buffer header

Published Nov 30, 2026 CVSS 3.1 · 7.0 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

pstore: reject persistent RAM zones too small for the buffer header

persistent_ram_buffer_map() computes

prz->buffer_size = size - sizeof(struct persistent_ram_buffer);

without checking that size is large enough to hold the header. A
ramoops zone configured with a tiny size (e.g. ramoops.pmsg_size=1)
underflows buffer_size to a huge value, which defeats every bounds
check in persistent_ram_write() and persistent_ram_write_user(); a
write to /dev/pmsg0 then copies user data far past the end of the zone
and corrupts kernel memory.

Reject zones that are not larger than the buffer header.

Analysis

AI-generated

Technical impact

persistent_ram_buffer_map() in the Linux kernel wrongly calculates the buffer size for persistent RAM zones by subtracting the size of the struct header without checking that the zone is large enough, leading to an underflow that produces an oversized buffer_size. The inflated size bypasses all bounds checks in persistent_ram_write() and persistent_ram_write_user(); as a result, a write to /dev/pmsg0 copies user data far beyond the intended zone and corrupts kernel memory. This flaw can be used to overwrite arbitrary kernel addresses, potentially allowing a local attacker to gain escalated privileges.

Affected Systems

The vulnerability is present in the mainstream Linux kernel and affects any build that implements persistent RAM zones, such as the ramoops subsystem, before the upstream commit that rejects zones smaller than the struct header size. No specific kernel version is listed, so all kernels lacking the rejection logic can be impacted. Systems that enable persistent RAM or ramoops may therefore be vulnerable.

Risk and Exploitability

The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, indicating that public exploitation has not yet been reported. Attackers would typically need local access and write permission to the /dev/pmsg0 device node, making a local attack vector likely; remote exploitation would require a separate vulnerability to grant local write access. The CVSS score of 7.0 reflects a high risk, indicating that the kernel memory corruption could lead to full system compromise if exploited by a compromised local user.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that includes the commit rejecting persistent RAM zones smaller than the struct header.
  • If an immediate kernel update is not possible, disable persistent‑RAM features or remove the /dev/pmsg* device nodes to prevent writes that could trigger the overflow.
  • For systems that must use persistent RAM, verify that the configured zone size (e.g., ramoops.pmsg_size) is larger than the size of struct persistent_ram_buffer; adjust the value accordingly.

Generated by OpenCVE AI on December 1, 2026 at 17:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-680
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-119
CWE-680
CWE-787
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: pstore: reject persistent RAM zones too small for the buffer header persistent_ram_buffer_map() computes prz->buffer_size = size - sizeof(struct persistent_ram_buffer); without checking that size is large enough to hold the header. A ramoops zone configured with a tiny size (e.g. ramoops.pmsg_size=1) underflows buffer_size to a huge value, which defeats every bounds check in persistent_ram_write() and persistent_ram_write_user(); a write to /dev/pmsg0 then copies user data far past the end of the zone and corrupts kernel memory. Reject zones that are not larger than the buffer header.
Title pstore: reject persistent RAM zones too small for the buffer header
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM