CVE-2026-99539 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

ksmbd: fix session reference leak on compounded SESSION_SETUP

A compound request can place SESSION_SETUP after another command. That earlier command leaves a reference to its session in work->sess. smb2_sess_setup() then overwrites work->sess with the session it looks up or creates, and the dispatcher later puts work->sess only once. The inherited reference is never dropped. That leaks the session, together with its setup connection and socket, and every repeat of the compound leaks another.

unreferenced object (size 512): __kmalloc_cache_noprof+0x32c/0x3a0 ksmbd_smb2_session_create+0xf6/0x9c0 [ksmbd]
smb2_sess_setup+0xda4/0x6280 [ksmbd]
handle_ksmbd_work+0x88c/0x1cb0 [ksmbd]

Save the inherited session on entry. After the request has been processed, release it once, but only when smb2_sess_setup() has replaced work->sess with its own session or cleared it. Do this after ksmbd_conn_unlock() so the put does not run under srv_mutex. An error path may instead leave the inherited session in work->sess. Keep it there, so the dispatcher still puts it and the error response is still signed or encrypted with it as before.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/20/2026

The vulnerability identified within the Linux kernel's ksmbd component represents a critical resource management flaw involving reference counting errors during compound SMB2 requests. Specifically, this issue manifests when a SESSION_SETUP command follows another command within a single compound request structure. In such scenarios, the initial command leaves an active reference to its associated session object stored in the work context variable named sess. When the kernel subsequently processes the subsequent smb2_sess_setup function call, it overwrites this work->sess pointer with either a newly looked up or created session object for the setup operation. The core technical flaw lies in the lifecycle management of these objects: while the dispatcher responsible for cleaning up work structures ensures that work->sess is released exactly once after processing completes, it fails to account for the original reference inherited from the preceding command because that pointer has been overwritten and thus lost track of the initial session object.

This oversight results in a persistent memory leak where each occurrence of such compound requests causes an unreferenced session object to remain allocated in kernel space without any mechanism for its eventual release. Over time, particularly under conditions involving repeated or sustained network traffic utilizing this specific request pattern, these leaked objects accumulate, consuming system memory resources including the setup connection structures and associated socket descriptors tied to each orphaned session. The technical footprint of this vulnerability aligns with CWE-401, which describes a missing release of memory after successful allocation, leading directly to resource exhaustion conditions that can degrade system performance or potentially trigger denial-of-service scenarios by exhausting available kernel memory pools.

The operational impact extends beyond simple memory consumption as the accumulation of unreferenced session objects may eventually lead to instability within the ksmbd service handling SMB connections. Attackers capable of crafting and sending malicious compound requests could exploit this behavior to systematically drain system resources, thereby impacting the availability of file sharing services provided by the Linux kernel module. From a threat modeling perspective utilizing the MITRE ATT&CK framework, this vulnerability facilitates resource exhaustion attacks where adversaries leverage improper internal state management to degrade service reliability without necessarily requiring authentication or privilege escalation beyond what is needed to send network packets to the affected ksmbd endpoint.

To mitigate this risk, developers have implemented a fix that involves carefully managing session references throughout the compound request processing lifecycle. The solution requires saving the inherited session reference at the entry point of handling the compound work item before any overwrites occur. After the request has been fully processed and unlocked via ksmbd_conn_unlock to avoid holding locks during resource release, the code now explicitly releases this saved inherited session exactly once, but only if smb2_sess_setup successfully replaced or cleared the primary work->sess pointer. This ensures that both the original session from the first command and any new session established by SESSION_SETUP are properly accounted for and released when appropriate. Furthermore, in error paths where the setup might fail to replace the session reference, the logic preserves the inherited session within work->sess so that the dispatcher can still perform its standard cleanup routine, ensuring consistent behavior across both success and failure execution flows while maintaining correct signature or encryption contexts for responses.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!