CVE-2026-98221 in Linuxinfo

Summary

by MITRE • 10/06/2026

In the Linux kernel, the following vulnerability has been resolved:

KEYS: trusted: Fix tpm2_load_cmd() boundary check

tpm2_load_cmd() does boundary checks against the ASN.1 size i.e., payload->blob_len. Address this by passing the decoded blob size to tpm2_load_cmd(), and use it for the boundary checks.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 10/07/2026

The Linux kernel's key management subsystem contains a critical implementation flaw within the trusted keys functionality, specifically in the TPM 2.0 command handling routine known as tpm2_load_cmd(). This function is responsible for loading public or private keys into a Trusted Platform Module (TPM) chip during the initialization of trusted key objects. The vulnerability arises from an incorrect boundary check mechanism that validates input data against the wrong metric, potentially allowing malformed or maliciously crafted payloads to bypass security checks and cause memory corruption or undefined behavior within the kernel space.

The core technical flaw lies in how tpm2_load_cmd() performs its validation logic prior to processing the key blob. The function originally conducted boundary checks against ASN.1 encoded size information, specifically referencing payload->blob_len. This value represents the length of the data as defined by the Abstract Syntax Notation One encoding scheme used for structuring the input parameters. However, the actual binary blob that is passed to the TPM hardware and processed internally has a different effective size after decoding from its ASN.1 wrapper. By validating against the encoded container size rather than the decoded payload size, the function fails to detect when the underlying raw data exceeds the expected limits for safe processing by the TPM interface or subsequent kernel routines.

This discrepancy creates a scenario where an attacker who can influence the input parameters of trusted key operations might supply a blob that appears valid under ASN.1 length constraints but actually contains more bytes than the system expects after decoding. When tpm2_load_cmd() proceeds with this oversized decoded data, it may lead to buffer overflows or out-of-bounds memory accesses within the kernel's TPM driver layer. Such conditions can result in privilege escalation if an unprivileged user is able to trigger these code paths through key management syscalls, potentially leading to full system compromise. The issue highlights a common class of errors where encoding metadata is conflated with actual data payload dimensions during security validation steps.

From a classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation and CWE-134 Use of Externally-Controlled Format String or CWE-787 Out-of-bounds Write depending on the specific exploitation outcome. In terms of attack vectors, it relates to ATT&CK technique T1556 which covers modifying authentication processes, as trusted keys are integral to secure boot and disk encryption workflows in modern Linux distributions. The flaw undermines the integrity guarantees provided by TPM-based key storage, potentially allowing unauthorized access to encrypted volumes or system credentials if the trust chain is compromised through this kernel-level memory safety issue.

The resolution involves correcting the logic within tpm2_load_cmd() to ensure that boundary checks are performed against the actual decoded blob size rather than the ASN.1 encoded length. By passing the correctly calculated decoded size to the validation routine, the function now accurately verifies that the data fits within expected limits before interacting with TPM hardware or allocating kernel memory structures associated with key objects. This fix ensures that any attempt to inject oversized payloads is rejected early in the processing pipeline, preventing potential exploitation of the boundary check bypass.

To mitigate risks associated with this vulnerability prior to patching, administrators should restrict access to trusted key management interfaces by ensuring that only privileged users can invoke related syscalls. Additionally, enabling strict kernel hardening options such as CONFIG_SECURITY_LOCKDOWN_LSM_EARLY and enforcing secure boot modes can help limit the attack surface for local privilege escalation attempts involving TPM interactions. Organizations running affected Linux kernels should apply vendor-provided security updates promptly to restore proper input validation logic within the trusted keys subsystem and maintain the integrity of hardware-backed cryptographic operations.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/06/2026

Moderation

accepted

EPSS

0.00172

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!