CVE-2026-139757

crypto: asymmetric_keys - fix OOB read in pefile_parse_binary

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

crypto: asymmetric_keys - fix OOB read in pefile_parse_binary

pefile_parse_binary() reads the size field of the certificate table's
data-directory entry, which sits at fixed index 4 of the PE optional
header's data directory:

ctx->certs_size = ddir->certs.size;

but nothing ensures index 4 is present. n_data_dirents (the untrusted
NumberOfRvaAndSizes) is only upper-bounded against header_size and may be
0, and header_size need only satisfy cursor < header_size < datalen. A
crafted PE with n_data_dirents = 0 and a tiny header_size therefore causes
the ddir->certs.size read to land past the end of the image (CWE-125). The
chkaddr() that bounds the certificate blob runs only after this read.

verify_pefile_signature() is reached from kexec_file_load() (the
lockdown/secure-boot enforced PE-image signature path), and the image is
parsed before its signature is checked. The trigger needs CAP_SYS_BOOT and
the access is out-of-bounds read only (no write).

Require the certificate table's data-directory entry (index 4) to be
present; the existing upper-bound check then keeps ddir->certs within
[cursor, header_size).

Analysis

AI-generated

Technical impact

The Linux kernel function pefile_parse_binary reads the size field of the certificate table entry in a PE image without first verifying that the entry exists. A crafted PE file can set the number of data directory entries to zero and a small header size, causing the read to occur past the end of the image. This out‑of‑bounds read falls under CWE‑125. The function is called from kexec_file_load, which is used during secure boot and lockdown; the process that triggers the parse must hold the CAP_SYS_BOOT capability. The flaw is a read‑only vulnerability, so it cannot be directly used to execute code or write memory, but it may leak kernel memory contents or cause a kernel fault.

Affected Systems

All Linux kernel builds that implement the pefile_parse_binary routine are potentially affected, as no specific vulnerable versions are listed. Until the fix is applied the vulnerability exists in the overall kernel code base.

Risk and Exploitability

The vulnerability requires high privileges (CAP_SYS_BOOT) and performs only a read, limiting the impact to possible information disclosure or kernel crash. The EPSS score is not available, implying limited public knowledge of exploitation attempts. The vulnerability is not listed in the CISA KEV catalog. The primary risk is that privileged users or compromised privileged processes could provide crafted PE files to trigger the out-of-bounds read.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the fix for pefile_parse_binary; the commit validates the certificate table entry before accessing it.
  • Restrict the CAP_SYS_BOOT capability to trusted system processes or users to prevent unprivileged activation of kexec_file_load.
  • Enable secure boot and lockdown policies so that only signed PE images are processed, reducing the chance that a malicious PE file is parsed.

Generated by OpenCVE AI on December 1, 2026 at 02:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-125
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: asymmetric_keys - fix OOB read in pefile_parse_binary pefile_parse_binary() reads the size field of the certificate table's data-directory entry, which sits at fixed index 4 of the PE optional header's data directory: ctx->certs_size = ddir->certs.size; but nothing ensures index 4 is present. n_data_dirents (the untrusted NumberOfRvaAndSizes) is only upper-bounded against header_size and may be 0, and header_size need only satisfy cursor < header_size < datalen. A crafted PE with n_data_dirents = 0 and a tiny header_size therefore causes the ddir->certs.size read to land past the end of the image (CWE-125). The chkaddr() that bounds the certificate blob runs only after this read. verify_pefile_signature() is reached from kexec_file_load() (the lockdown/secure-boot enforced PE-image signature path), and the image is parsed before its signature is checked. The trigger needs CAP_SYS_BOOT and the access is out-of-bounds read only (no write). Require the certificate table's data-directory entry (index 4) to be present; the existing upper-bound check then keeps ddir->certs within [cursor, header_size).
Title crypto: asymmetric_keys - fix OOB read in pefile_parse_binary
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:37 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:20 PM
Modified
Nov 30, 2026, 2:20 PM