]> git.ipfire.org Git - thirdparty/samba.git/commit
s3: VFS: vfs_default. Protect vfs_fsync_done() from accessing a freed req pointer.
authorJeremy Allison <jra@samba.org>
Fri, 28 Feb 2020 00:56:41 +0000 (16:56 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 8 Mar 2020 18:07:43 +0000 (18:07 +0000)
commit18671534e42f66b904e51c3fbe887e998ff79493
tree2e59b9a269480ee344a6885e7011160c258dc667
parentd623779913e0d4a46d7e299dc41b5c83cb127872
s3: VFS: vfs_default. Protect vfs_fsync_done() from accessing a freed req pointer.

If the fsp is forced closed by a SHUTDOWN_CLOSE whilst the
request is in flight (share forced closed by smbcontrol),
then we set state->req = NULL in the state destructor.

The existing state destructor prevents the state memory
from being freed, so when the thread completes and calls
vfs_fsync_done(), just throw away the result if
state->req == NULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_default.c