Skip to content

Commit 2dd2b22

Browse files
committed
ksmbd: fix slab-use-after-free in smb2_lock
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent be31428 commit 2dd2b22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

smb2pdu.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -8059,13 +8059,13 @@ int smb2_lock(struct ksmbd_work *work)
80598059
}
80608060

80618061
no_check_cl:
8062+
flock = smb_lock->fl;
8063+
list_del(&smb_lock->llist);
8064+
80628065
if (smb_lock->zero_len) {
80638066
err = 0;
80648067
goto skip;
80658068
}
8066-
8067-
flock = smb_lock->fl;
8068-
list_del(&smb_lock->llist);
80698069
retry:
80708070
rc = vfs_lock_file(filp, smb_lock->cmd, flock, NULL);
80718071
skip:

0 commit comments

Comments
 (0)