]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname
authorPaulo Alcantara <pc@manguebit.com>
Fri, 21 Apr 2023 18:52:32 +0000 (15:52 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:17:14 +0000 (12:17 +0200)
commit72a5c8487f2e31341098f05b695ac50c9762b0af
tree25032370471e0127824287d7a0fe90dda63e5d1c
parent3a485090f54aaaa1a5d0a71bd67691c42bfc1b71
cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname

BugLink: https://bugs.launchpad.net/bugs/2025067
commit 90c49fce1c43e1cc152695e20363ff5087897c09 upstream.

TCP_Server_Info::hostname may be updated once or many times during
reconnect, so protect its access outside reconnect path as well and
then prevent any potential use-after-free bugs.

Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.h
fs/cifs/connect.c
fs/cifs/sess.c