CVE-2026-99525 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

smb: client: fix use-after-free in cifs_ses_add_channel()

The error path of cifs_ses_add_channel() calls cifs_put_tcp_session() before cifs_chan_clear_need_reconnect(). The latter reaches cifs_ses_get_chan_index(), which dereferences server->terminate; if the put was the final reference, TCP_Server_Info is already freed and this is a use-after-free. Same put-then-use pattern as the recently fixed sibling in commit 717e0a25036b ("cifs: Fix server use-after-free in cifs_chan_skip_or_disable()").

Move the put last, but do not read chan->server after dropping chan_lock: chan points into ses->chans[], and once chan_count is
decremented a concurrent add_channel can reuse the slot and overwrite the pointer, so the put would act on the new channel's server. Cache the pointer under chan_lock, clear the reconnect bit and decrement chan_count while still holding the reference, and release it after the unlock.

This issue was discovered by Tencent CodeBuddy Security.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/20/2026

The Linux kernel contains a critical use-after-free vulnerability within the Common Internet File System client implementation, specifically in the cifs_ses_add_channel function. This flaw arises from an incorrect ordering of reference counting operations during error handling paths. The core issue is that the code invokes cifs_put_tcp_session to release a reference on the TCP server structure before executing cifs_chan_clear_need_reconnect. The latter function subsequently calls cifs_ses_get_chan_index, which attempts to dereference the terminate flag within the server object. If the preceding put operation was the final reference holding the server alive, the memory for the TCP_Server_Info structure has already been freed and potentially reallocated for other purposes. Consequently, any subsequent access constitutes a use-after-free condition, allowing an attacker who can trigger this error path to read or write arbitrary kernel memory based on what new object occupies that freed address space.

This vulnerability is classified under CWE-416, which describes the dangerous practice of using a pointer after it has been freed. In terms of attack vector and technique mapping, this aligns with ATT&CK techniques related to exploitation for privilege escalation or denial of service through memory corruption. The specific pattern mirrors other recently addressed issues in the CIFS subsystem, such as the fix found in commit 717e0a25036b regarding cifs_chan_skip_or_disable, indicating a systemic risk in how reference counts and lock scopes are managed across channel management functions. An attacker could potentially leverage this flaw to crash the system by triggering an invalid memory access or, more severely, to execute arbitrary code if they can control the contents of the reused memory region through carefully crafted network requests that force the error path into execution.

The resolution involves restructuring the sequence of operations within cifs_ses_add_channel to ensure safe reference management and prevent race conditions during concurrent channel modifications. The fix mandates moving the release of the TCP session reference to occur after all necessary accesses are completed, but with a crucial modification regarding lock scope. Simply swapping the order is insufficient because chan points into an array ses->chans[], and decrementing chan_count while holding only certain locks can allow a concurrent add_channel operation to reuse that slot and overwrite the pointer before the put occurs. To mitigate this race condition, the fix requires caching the server pointer under the protection of chan_lock. The reconnect bit is cleared and chan_count is decremented while still holding this reference lock, ensuring no other thread can modify the channel array entry during these critical updates. Only after releasing the lock is the final reference to the TCP session dropped, guaranteeing that the memory remains valid throughout the entire sequence of operations required for cleanup.

Mitigation strategies for organizations running affected versions of the Linux kernel involve applying the upstream patch immediately upon availability. Since this vulnerability resides in a core networking component used by many enterprise storage solutions relying on SMB/CIFS protocols, timely updates are essential to maintain system integrity and confidentiality. Administrators should monitor vendor security advisories for specific package updates that include this fix. Additionally, implementing strict network segmentation and limiting exposure of CIFS services can reduce the attack surface available to potential exploiters attempting to trigger these error paths through malformed or maliciously crafted SMB traffic.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!