Commit ec28c350 authored by ChenXiaoSong's avatar ChenXiaoSong Committed by Greg Kroah-Hartman
Browse files

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



commit 4e8771a3 upstream.

null-ptr-deref will occur when (req_op_level == SMB2_OPLOCK_LEVEL_LEASE)
and parse_lease_state() return NULL.

Fix this by check if 'lease_ctx_info' is NULL.

Additionally, remove the redundant parentheses in
parse_durable_handle_context().

Signed-off-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
[ Drop the parentheses clean-up since the parentheses was introduced by
  c8efcc78 ("ksmbd: add support for durable handles v1/v2") in v6.9
  Minor context change fixed ]
Signed-off-by: default avatarJianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f27602b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment