smbd: Fix use-after-free from exit_server_common()
authorVolker Lendecke <vl@samba.org>
Wed, 31 Jul 2019 12:17:02 +0000 (14:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 1 Aug 2019 15:39:12 +0000 (15:39 +0000)
commitc226dc6e8a18343031829c35552e557903593daf
treef9b4695d519b6d40f49d4dce394977d40cdf138f
parent10e140d25cd3cad8428e3b080ef28dd237d903d5
smbd: Fix use-after-free from exit_server_common()

We need to keep the smbXsrv_connection structures around until all
pending requests have had their chance to clean up behind them. If you
look at srv_send_smb(), it's exactly prepared already to just drop
anything on the floor when the transport has been declared dead:

if (!NT_STATUS_IS_OK(xconn->transport.status)) {
/*
 * we're not supposed to do any io
 */
return true;
}

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14064

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  1 15:39:13 UTC 2019 on sn-devel-184
source3/smbd/server_exit.c