summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-06-12 08:00:00 +0900
committerSteve French <stfrench@microsoft.com>2026-06-16 18:57:22 -0500
commitbe6d26bf27499977c746abc163659915082348d8 (patch)
tree59d8df96b7f6bee40b08c9b3c4d904ed1b8fee7f /drivers/phy/eswin/git@git.tavy.me:linux.git
parent388e4139db27a9e3612c9d356b826f5b1ff6a9e3 (diff)
ksmbd: serialize QUERY_DIRECTORY requests per file
smb2_query_dir() stores a pointer to its stack-allocated private data in the ksmbd_file readdir_data. Concurrent QUERY_DIRECTORY requests using the same file handle can overwrite this pointer while an iterate_dir() callback is still using it, resulting in a stack use-after-free. Add a per-file mutex and hold it while accessing the shared directory enumeration state. The lock covers scan restart, dot entry state, readdir_data setup and iteration, and response construction. This prevents another request from replacing readdir_data.private before the current request has finished using it and also serializes the shared file position. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-30527 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions