Skip to content

Commit

Permalink
ksmbd: fix uaf in smb20_oplock_break_ack
Browse files Browse the repository at this point in the history
commit c698134 upstream.

drop reference after use opinfo.

Signed-off-by: luosili <rootlab@huawei.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
luosili authored and gregkh committed Oct 10, 2023
1 parent a2ca5fd commit 8226ffc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/smb/server/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8128,10 +8128,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;
Expand Down

0 comments on commit 8226ffc

Please sign in to comment.