smb: client: fix potential UAF in smb2_close_cached_fid()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix potential UAF in smb2_close_cached_fid()
find_or_create_cached_dir() could grab a new reference after kref_put() had seen the refcount drop to zero but before cfid_list_lock is acquired in smb2_close_cached_fid(), leading to use-after-free.
Switch to kref_put_lock() so cfid_release() is called with cfid_list_lock held, closing that gap.
From the CVE record · Linux
A reference-counting race in the Linux kernel SMB client can cause a use-after-free in smb2_close_cached_fid(). The input does not establish how an attacker could trigger it or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the SMB client should check their versions; affected versions were not provided.