KernelScan.io

HIGH

cifs TconFields Race

CVE-2026-43215

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

KernelScan AI5.8MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: cifs: Fix locking usage for tcon fields We used to use the cifs_tcp_ses_lock to protect a lot of objects that are not just the server, ses or tcon lists. We later introduced srv_lock, ses_lock and tc_lock to protect fields within the corresponding structs. This was done to provide a more granular protection and avoid unnecessary serialization. There were still a couple of uses of cifs_tcp_ses_lock to provide tcon fields. In this patch, I've replaced them with tc_lock.

02

Engine v0.2.0

Risk summary

Local users with low privileges can trigger a race condition in CIFS/SMB client code by accessing tcon (tree connection) reference counts concurrently. This can lead to use-after-free conditions, memory corruption, or kernel crashes when using SMB/CIFS network file shares.

Affectedfs/smb/client/ (CIFS/SMB client)

Vulnerability analysis

The vulnerability stems from incorrect locking granularity in the CIFS client code. Several code paths continued to use a coarse-grained global lock (cifs_tcp_ses_lock) to protect per-tcon fields like tc_count, while other paths used the finer-grained per-tcon tc_lock. This creates a race condition where concurrent operations on the same tcon can corrupt the reference count. A lost increment can cause premature object freeing (use-after-free), while a lost decrement can cause memory leaks. The fix replaces the remaining uses of the global lock with tc_lock and ensures consistent reference counting through cifs_put_tcon().

03

BranchFixed inPatch commit
6.126.12.75601dd3b79769
6.186.18.163969db6b22e3
6.196.19.68c59eeeeffa1
6.66.6.128953953abb66e
mainline7.096c4af418586