CVE-2026-99531 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

ksmbd: verify transform SessionId matches the decrypted header

When an encrypted request comes in, the decryption key is picked by the SessionId in the transform header, but the request is then authorized under whatever session the decrypted inner header names. Nothing ever compares the two, so on a connection with more than one session a client can get a request decrypted with one session's key and run it as another session. Encrypted requests are exempt from signing too, so a valid AEAD tag is the only proof of session identity, and it is checked against the wrong session.

MS-SMB2 says the server must check that the transform SessionId matches the one in the decrypted SMB2 header and treat a mismatch as a protocol error. Add that check in __handle_ksmbd_work() after decryption, before dispatching: the message has to be at least one fixed SMB2 header, the first operation must not set SMB2_FLAGS_RELATED_OPERATIONS and its SessionId must match the transform SessionId, and every following non-related operation in a compound chain must carry the same SessionId. NextCommand offsets must be 8-byte aligned and stay inside the message; the bounds check is done by subtraction so it cannot wrap.

When the decrypted payload is a compression transform, the existing decompression step runs first and the decompressed SMB2 message is checked instead, since a compression transform header carries no SessionId.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/19/2026

The Linux kernel implementation of ksmbd contained a critical authentication bypass vulnerability related to how encrypted SMB requests were processed when multiple sessions existed on a single connection. The core flaw lay in the discrepancy between the session identifier used for decryption and the one validated during authorization. Specifically, when an incoming request was encrypted using AES-GCM or similar authenticated encryption with associated data (AEAD), the server selected the appropriate decryption key based solely on the SessionId found in the outer transform header. However, after decrypting the payload, the system authorized the resulting SMB2 message against a different session context derived from the inner decrypted header. This lack of cross-verification allowed an attacker to exploit connections supporting multiple concurrent sessions by submitting a request encrypted with one session's key but containing credentials or identifiers for another valid session in its plaintext body.

This vulnerability effectively undermines the integrity and confidentiality guarantees provided by SMB encryption. Because encrypted requests are exempt from message signing checks, the AEAD tag serves as the primary mechanism for verifying both data integrity and identity. By failing to ensure that the SessionId used to derive the decryption key matches the SessionId within the decrypted payload, ksmbd allowed a valid cryptographic proof of authenticity to be applied to an incorrect security context. This misalignment enabled session hijacking scenarios where a client could potentially execute commands or access resources under the privileges of a different authenticated user on the same network connection, provided they possessed the encryption key for their own session but crafted the inner header to mimic another active session.

The resolution involves implementing strict validation logic within the __handle_ksmbd_work function immediately following decryption and prior to request dispatching. This fix enforces compliance with Microsoft SMB2 specification requirements which mandate that servers must verify consistency between transform headers and decrypted payloads. The updated code ensures that the message structure is valid by confirming it contains at least a fixed-size SMB2 header. It further validates that the first operation does not set the SMB2_FLAGS_RELATED_OPERATIONS flag, ensuring independent request processing for initial validation steps. Crucially, the SessionId extracted from the inner decrypted header must exactly match the SessionId present in the outer transform header before any business logic is executed.

For compound requests involving multiple operations within a single network packet, additional constraints are applied to maintain session consistency throughout the chain. Every subsequent operation that does not carry the SMB2_FLAGS_RELATED_OPERATIONS flag must also utilize the same matching SessionId as established by the initial check. This prevents attackers from chaining related and unrelated operations to bypass session boundaries or mix contexts within a single transmission. Furthermore, the implementation includes rigorous bounds checking for NextCommand offsets, ensuring they are aligned to eight-byte boundaries and remain strictly within the message buffer limits. These checks utilize subtraction-based arithmetic which inherently avoids integer wraparound vulnerabilities, thereby preventing potential memory corruption issues alongside the authentication fix.

Special handling is required for compression transforms where the outer header does not contain a SessionId field because session identity must be inferred from the inner content after decompression. In these cases, the system performs the decompression step first to reveal the underlying SMB2 message structure. Once uncompressed, the standard validation logic applies, checking that any present identifiers align correctly with established session contexts. This ensures that compression does not introduce a blind spot in authentication verification where identity could be obscured or manipulated before integrity checks occur.

From a threat modeling perspective, this vulnerability maps to CWE-306 Missing Authentication for Critical Function and CWE-287 Improper Authentication within the Common Weakness Enumeration framework. In terms of adversary tactics, it aligns with MITRE ATT&CK technique T1550 Use Alternate Authentication Material, specifically allowing lateral movement or privilege escalation through session manipulation in environments where SMB encryption is enabled but not properly validated against multiple concurrent sessions. The impact ranges from unauthorized access to sensitive files and directories to potential full system compromise if administrative shares are accessible under the hijacked session context.

Mitigation strategies primarily involve applying the kernel patch that enforces these strict SessionId matching rules during request processing. Administrators should ensure their systems are updated with versions of ksmbd that include this validation logic. Additionally, while encryption provides confidentiality, organizations should also consider implementing network-level segmentation to limit exposure of SMB services and monitor for anomalous authentication patterns that might indicate exploitation attempts against unpatched instances. Regular auditing of session management configurations helps maintain the integrity of multi-session environments where such vulnerabilities could otherwise be leveraged by malicious actors seeking to escalate privileges or exfiltrate data under false identities.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00174

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!