diff options
| author | Akif <akif.sait111@gmail.com> | 2026-04-17 21:27:09 +0300 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-04-18 20:19:59 +0300 |
| commit | 1baff47b81f94f9231c91236aa511420d0e266b9 (patch) | |
| tree | 33c582c0dac9f7b2f6cab8fd14d9bed8723075bd /include/linux/timerqueue.h | |
| parent | 3e4e2ea2a781018ed5d75f969e3e5606beb66e48 (diff) | |
| download | linux-1baff47b81f94f9231c91236aa511420d0e266b9.tar.xz | |
ksmbd: fix use-after-free in smb2_open during durable reconnect
In smb2_open, the call to ksmbd_put_durable_fd(fp) drops the reference
to the durable file descriptor early during the durable reconnect
process. If an error occurs subsequently (eg, ksmbd_iov_pin_rsp fails)
or a scavenger accesses the file, it leads to a use-after-free when
accessing fp properties (eg fp->create_time).
Move the single put to the end of the function below err_out2 so fp
stays valid until smb2_open returns.
Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2")
Signed-off-by: Akif <akif.sait111@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
