Skip to content

Commit

Permalink
ksmbd: fix uaf in smb20_oplock_break_ack
Browse files Browse the repository at this point in the history
drop reference after use opinfo.

Signed-off-by: luosili <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
luosili authored and namjaejeon committed Oct 4, 2023
1 parent 36eb997 commit 2dc0dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8661,10 +8661,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 2dc0dc4

Please sign in to comment.