From: luosili Date: Wed, 4 Oct 2023 09:29:36 +0000 (+0900) Subject: ksmbd: fix uaf in smb20_oplock_break_ack X-Git-Tag: v6.6.17~3783^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c69813471a1ec081a0b9bf0c6bd7e8afd818afce;p=platform%2Fkernel%2Flinux-rpi.git ksmbd: fix uaf in smb20_oplock_break_ack drop reference after use opinfo. Signed-off-by: luosili Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 420e7691c8cf..b9d6e8e451ba 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -8038,10 +8038,10 @@ static void smb20_oplock_break_ack(struct ksmbd_work *work) goto err_out; } - opinfo_put(opinfo); - ksmbd_fd_put(work, fp); opinfo->op_state = OPLOCK_STATE_NONE; wake_up_interruptible_all(&opinfo->oplock_q); + opinfo_put(opinfo); + ksmbd_fd_put(work, fp); rsp->StructureSize = cpu_to_le16(24); rsp->OplockLevel = rsp_oplevel;