CVE-2026-139337

ima: reject a kexec buffer whose declared size exceeds the buffer

Published Nov 30, 2026 CVSS 3.1 · 5.1 Medium EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ima: reject a kexec buffer whose declared size exceeds the buffer

ima_restore_measurement_list() parses the measurement list persisted across
kexec. It computes the parse end directly from the blob:

bufendp = buf + khdr->buffer_size;

khdr->buffer_size is a u64 read straight from the persisted buffer. The
only length checks in the function are size >= sizeof(*khdr), version == 1
and count -- none relates buffer_size to size, the actual buffer size the
caller (ima_load_kexec_buffer()) obtained from the ima-kexec-buffer region.
ima_parse_buf() bounds every field read to bufendp, so a blob whose
internal buffer_size exceeds the real size makes the parse loop read past
the end of the buffer (CWE-125).

The buffer's memory range is validated against addressable RAM by
commit cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer
against memory bounds") and commit c5489d04337b ("x86/kexec: add a
sanity check on previous kernel's ima kexec buffer"), but the blob's
own declared size is never clamped to it. Reject a buffer_size larger
than size before the loop.

This is on the boot-time kexec-restore path (__init) and the buffer comes
from the previous kernel, so triggering it requires control of the
persisted buffer; it is an out-of-bounds read only.

Analysis

AI-generated

Technical impact

ima_restore_measurement_list() in the Linux kernel parses a persisted measurement list during a kexec restore. The function calculates the end of the data blob using a buffer_size field that is read directly from the blob, with no check against the actual size of the blob. If this declared buffer_size exceeds the real size, subsequent reads in the parse loop read past the end of the buffer, exposing data that may reside beyond the blob’s bounds. This flaw is a classic out‑of‑bounds read (CWE‑125) and can leak kernel memory contents during the boot‑time kexec restore process.

Affected Systems

All Linux kernels that include the Integrity Measurement Architecture subsystem and support the kexec restore pathway are affected. The vulnerability resides in core kernel code and is not limited to a specific release series. Any kernel configuration that incorporates IMA and kexec functionality contains the original ima_restore_measurement_list implementation and remains vulnerable until the upstream fix is merged.

Risk and Exploitability

The fault is an out‑of‑bounds read that occurs only during the very early boot phase when a previous kernel’s ima‑kexec buffer is processed. An attacker must control the contents of that persisted buffer before reboot; this requirement makes exploitation largely offline and dependent on prior kernel compromise rather than a third‑party network attack. The EPSS score is currently unavailable and the vulnerability is not listed in the CISA KEV catalog, indicating no known active exploitation campaigns. Despite its read‑only nature, the data exposed could aid an attacker in further compromising the system, so the risk is considered moderate to high pending a publicly available patch.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to a Linux kernel release that contains the fix for the ima_restore_measurement_list bug, which rejects buffers whose declared size exceeds the actual buffer.
  • If an immediate kernel upgrade is not feasible, disable the kexec functionality (e.g., by setting kernel.kexec_enable=0 or by removing the kexec module) to prevent the vulnerable restore path from executing.
  • Patch the IMA subsystem to validate buffer_size against the actual buffer length before parsing, or otherwise reject any malformed measurement lists during the restore process. This is the precise upstream fix and should be incorporated into any custom kernel builds.

Generated by OpenCVE AI on December 1, 2026 at 07:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-125
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ima: reject a kexec buffer whose declared size exceeds the buffer ima_restore_measurement_list() parses the measurement list persisted across kexec. It computes the parse end directly from the blob: bufendp = buf + khdr->buffer_size; khdr->buffer_size is a u64 read straight from the persisted buffer. The only length checks in the function are size >= sizeof(*khdr), version == 1 and count -- none relates buffer_size to size, the actual buffer size the caller (ima_load_kexec_buffer()) obtained from the ima-kexec-buffer region. ima_parse_buf() bounds every field read to bufendp, so a blob whose internal buffer_size exceeds the real size makes the parse loop read past the end of the buffer (CWE-125). The buffer's memory range is validated against addressable RAM by commit cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer against memory bounds") and commit c5489d04337b ("x86/kexec: add a sanity check on previous kernel's ima kexec buffer"), but the blob's own declared size is never clamped to it. Reject a buffer_size larger than size before the loop. This is on the boot-time kexec-restore path (__init) and the buffer comes from the previous kernel, so triggering it requires control of the persisted buffer; it is an out-of-bounds read only.
Title ima: reject a kexec buffer whose declared size exceeds the buffer
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:33 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:33 PM