]> git.baikalelectronics.ru Git - kernel.git/commit
cifsd: Fix potential null-ptr-deref in destroy_previous_session()
authorMarios Makassikis <mmakassikis@freebox.fr>
Thu, 6 May 2021 02:41:54 +0000 (11:41 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 11 May 2021 00:15:48 +0000 (19:15 -0500)
commitceb9a292f5c7b05a170cf425b0c5699630eba557
tree00569f801fcc95ee39abc39b36ce6c6a90cd78ae
parent10c867e2bbe122aa4fb0507464f7a5b7c6c75b54
cifsd: Fix potential null-ptr-deref in destroy_previous_session()

The user field in the session structure is allocated when the client is
authenticated. If the client explicitly logs off, the user field is freed,
but the session is kept around in case the user reconnects. If the TCP
connection hasn't been closed and the client sends a session setup with
a PreviousSessionId set, destroy_previous_session() will be called to
check if the session needs to be cleaned up.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifsd/smb2pdu.c