diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-06-05 07:30:16 +0300 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-06-17 02:57:21 +0300 |
| commit | 65b655f65c3ca1ab5d598d3832bb0ff531725858 (patch) | |
| tree | 7c2200e4f69baf8c8a4be91b33c566d526e23f0b /include/linux/debugobjects.h | |
| parent | 1ef06004ed4bd6d3ed8c840d9d1a376b66d4935b (diff) | |
| download | linux-65b655f65c3ca1ab5d598d3832bb0ff531725858.tar.xz | |
ksmbd: fix use-after-free in same_client_has_lease()
same_client_has_lease() returns an opinfo pointer from ci->m_op_list
after dropping ci->m_lock without taking a reference.
smb_grant_oplock() then dereferences that pointer in copy_lease() and
when checking breaking_cnt. A concurrent close can remove the old lease
from ci->m_op_list and drop the last reference before the caller uses
the returned pointer, leading to a use-after-free.
Take a reference when same_client_has_lease() selects an existing lease,
drop any previous match while scanning, and release the returned
reference in smb_grant_oplock() after copying the lease state.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
