Unverified Commit 8d4428a7 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11625 smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open()

parents d874ef28 0a528a60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1389,7 +1389,7 @@ void create_lease_buf(u8 *rbuf, struct lease *lease)
 * parse_lease_state() - parse lease context containted in file open request
 * @open_req:	buffer containing smb2 file open(create) request
 *
 * Return:  oplock state, -ENOENT if create lease context not found
 * Return:  allocated lease context object on success, otherwise NULL
 */
struct lease_ctx_info *parse_lease_state(void *open_req)
{
+1 −1
Original line number Diff line number Diff line
@@ -3115,7 +3115,7 @@ int smb2_open(struct ksmbd_work *work)
			goto err_out;
		}
	} else {
		if (req_op_level == SMB2_OPLOCK_LEVEL_LEASE) {
		if (req_op_level == SMB2_OPLOCK_LEVEL_LEASE && lc) {
			req_op_level = smb2_map_lease_to_oplock(lc->req_state);
			ksmbd_debug(SMB,
				    "lease req for(%s) req oplock state 0x%x, lease state 0x%x\n",