CVE-2026-64401

Source
https://cve.org/CVERecord?id=CVE-2026-64401
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64401.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64401
Downstream
Related
Published
2026-07-25T08:50:44.361Z
Modified
2026-08-18T03:30:52.795896846Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
smb: client: resolve SWN tcon from live registrations
Details

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

smb: client: resolve SWN tcon from live registrations

cifsswnnotify() looks up a witness registration by id under cifsswnregidrmutex, drops the mutex, and then uses the registration's cached tcon pointer. That pointer is not a lifetime reference, and it is not a stable representative once cifsgetswnreg() lets multiple tcons for the same net/share name share one registration id.

A same-share second mount can keep the cifsswnreg alive after the first tcon unregisters and is freed. The registration then still points at the freed first tcon, so taking tclock or incrementing tccount through swnreg->tcon only moves the use-after-free earlier. Taking tclock while holding cifsswnregidrmutex also violates the documented CIFS lock order.

Fix this by making the registration store only the stable witness identity: id, net name, share name, and notify flags. When a notify arrives, copy that identity under cifsswnregidrmutex, drop the mutex, then find and pin a live witness tcon that currently matches the net/share pair under the normal cifstcpseslock -> tc_lock order. The notification path uses that pinned tcon directly and drops the reference when done.

Registration and unregister messages now use the live tcon passed by the caller instead of a cached tcon in the registration. The final unregister send is folded into cifsswnunregister() while the registration is still protected by cifsswnregidr_mutex. This removes the previous find/drop/reacquire raw-pointer window. The release path only removes the idr entry and frees the stable identity strings.

This preserves the intended one-registration/many-tcon behavior: a registration id represents a net/share pair, and notify handling acts on a live representative selected at use time. It also preserves CLIENTMOVE ordering for the representative tcon because the old-IP unregister is sent before cifsswn_register() sends the new-IP register.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64401.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fed979a7e082bd9f25f9002c3c4f8740dacd0bc8
Fixed
51d18db392e5386a7bb9e816d611f14e600cca3c
Fixed
aa3c0cab4b28c5007ec570c63e1d6ad6943ed0fd
Fixed
945b4a4a54497db1dcb2f20ef801a84e884dac21
Fixed
91b8a58c6ac15c7db6518f696389933282f88da7
Fixed
0700f946659d0ab2352ec8a9b1c6fc74b13a27d7
Fixed
ec457f9afe5ae9538bdcd58fd4cb442b9787e183

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64401.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
6.1.178
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.145
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.97
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.39
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64401.json"