Commit c2be1845 authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Yang Yingliang
Browse files

cifs: fix panic in smb2_reconnect

mainline inclusion
from mainline-5.2-rc6
commit 0ff2b018
category: bugfix
bugzilla: 16811
CVE: NA

https://gitee.com/src-openeuler/cifs-utils/issues/I1C1QY?from=project-issue


-------------------------------------------------

RH Bugzilla: 1702264

We need to protect so that the call to smb2_reconnect() in
smb2_reconnect_server() does not end up freeing the session
because it can lead to a use after free and crash.

Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
Conflicts:
  fs/cifs/cifsproto.h
  fs/cifs/connect.c
[yyl: make cifs_put_smb_ses() extern]
Reviewed-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 79d1a532
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment