KernelScan.io

HIGH

crypto X509Parser OOB

CVE-2026-31430

CVSS 7.1 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

KernelScan AI6.1MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: X.509: Fix out-of-bounds access when parsing extensions Leo reports an out-of-bounds access when parsing a certificate with empty Basic Constraints or Key Usage extension because the first byte of the extension is read before checking its length. Fix it. The bug can be triggered by an unprivileged user by submitting a specially crafted certificate to the kernel through the keyrings(7) API. Leo has demonstrated this with a proof-of-concept program responsibly disclosed off-list.

02

Engine v0.2.0

Risk summary

An unprivileged local user can trigger a kernel out-of-bounds read by submitting a malformed X.509 certificate with empty Basic Constraints or Key Usage extensions through the keyrings(7) API. The invalid access can result in a kernel panic or oops when unmapped memory is touched, causing a complete system denial of service.

Affectedcrypto/asymmetric_keys/x509_cert_parser.c (X.509 certificate parser)

Vulnerability analysis

The vulnerability exists in the X.509 certificate parser (x509_process_extension) where the first byte of an extension (v[0]) is read before verifying the extension length (vlen). When parsing a certificate with an empty Basic Constraints or Key Usage extension, this causes an out-of-bounds read past the end of the extension buffer. The issue was introduced in kernel 6.4 and fixed by reordering the length validation before the array access. The attack surface is strictly local via the keyrings API, requires no special privileges, and does not require interaction from any user other than the attacker.

03

BranchFixed inPatch commit
6.126.12.8230ab358fad0c
6.186.18.23206121294b9c
6.196.19.137fb4dadc2734
6.66.6.135672b526def1f
mainline7.0d702c3408213