CVE-2026-139649

crypto: asymmetric_keys/x509 - copy X.509 TBS for data signature algorithms

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

crypto: asymmetric_keys/x509 - copy X.509 TBS for data signature algorithms

For signature algorithms operating on a message rather than a digest,
x509_get_sig_params() points sig->m directly into cert->tbs.
cert->tbs is the preparsed add_key() payload. The syscall wipes and frees
it on return, while the instantiated key retains public_key_signature.

A later KEYCTL_LINK into an asymmetric restricted keyring therefore passes
a dangling message pointer to ML-DSA. KASAN reports a slab-use-after-free
in mldsa_verify(), with allocation and free provenance both leading to
__do_sys_add_key(). Reuse is also an integrity issue: bytes occupying the
freed object become the authenticated message instead of the certificate's
own TBSCertificate.

Give the signature object its own copy of the TBS, as is already done for
a precomputed digest, and release it through the existing m_free contract.

Analysis

AI-generated

Technical impact

The vulnerability is a use‑after‑free scenario in the Linux kernel’s cryptographic subsystem. When a signature algorithm that operates on a message instead of a pre‑computed digest is processed, the kernel’s x509_get_sig_params function makes the signature’s m pointer refer directly to the certificate’s tbs field. The tbs payload is freed once the add_key system call returns, but the instantiated key still holds a reference to it. A subsequent KEYCTL_LINK into a restricted keyring therefore passes a dangling pointer to the ML‑DSA verification routine, causing a use‑after‑free that can be leveraged to tamper with the authenticated message or forge signatures. The flaw can corrupt the integrity of data signed with the affected key.

Affected Systems

Linux kernel (all builds before the patch that was merged to address the problem). No specific version range was provided, so any kernel version running the vulnerable code is considered affected.

Risk and Exploitability

The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog, indicating no publicly reported exploitation. Attack requires local access to create a key via add_key and subsequently link it into a restricted keyring, so the vector is likely local. The CVSS score of 5.5 indicates a moderate impact, as the use‑after‑free allows signature forgery and can compromise data integrity. Monitoring for anomalous key usage and applying the kernel update remain prudent.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to the latest available release that includes the fix for the use‑after‑free bug in the X.509 key handling code.
  • Limit usage of keyctl add_key and KEYCTL_LINK operations for asymmetric keys in restricted keyrings until the patch is applied; if the patch is not immediately available, restrict these operations to trusted, non‑privileged contexts.
  • Create an audit rule to monitor KEYCTL_LINK calls involving asymmetric keys to detect potential exploitation before the patch is applied.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: asymmetric_keys/x509 - copy X.509 TBS for data signature algorithms For signature algorithms operating on a message rather than a digest, x509_get_sig_params() points sig->m directly into cert->tbs. cert->tbs is the preparsed add_key() payload. The syscall wipes and frees it on return, while the instantiated key retains public_key_signature. A later KEYCTL_LINK into an asymmetric restricted keyring therefore passes a dangling message pointer to ML-DSA. KASAN reports a slab-use-after-free in mldsa_verify(), with allocation and free provenance both leading to __do_sys_add_key(). Reuse is also an integrity issue: bytes occupying the freed object become the authenticated message instead of the certificate's own TBSCertificate. Give the signature object its own copy of the TBS, as is already done for a precomputed digest, and release it through the existing m_free contract.
Title crypto: asymmetric_keys/x509 - copy X.509 TBS for data signature algorithms
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

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