Found by the Apple client test code at the SNIA SDC. Asking for SMB2_CLOSE_FLAGS_FULL_INFORMATION goes through the "fsp->fsp_flags.fstat_before_close" path in fd_close(). Returning NT_STATUS_NOT_FOUND causes the caller to crash. From Ralph's patch: If this is a stream and delete-on-close was set, the backing object (an xattr from streams_xattr) might already be deleted so fstat() fails with NT_STATUS_NOT_FOUND. Have regression test and patch, need bugnumber.
MR: https://gitlab.com/samba-team/samba/-/merge_requests/3300
This bug was referenced in samba master: f72ef19cf51d8ededa449344cc16b72cf3685302 c4047443a511f003eb855504315eeb8499fafcb7 340f0420bd34149ebe8fc76eb5fe4547970a5c5b 23deb79a28009f5c4ea2f2c2ceb84cfdbc9fb5b1 633a3ee6894cc1d05b44dbe47a278202803d9b21
Created attachment 18177 [details] git-am fix for 4.19.next, 4.18.next. Cherry-picked from master. I can't back-port the regression test as that relies on python client changes that are not in 4.19.x or 4.18.x.
Reassigning to Jule for inclusion in 4.18 and 4.19.
Pushed to autobuild-v4-{19,18}-test.
This bug was referenced in samba v4-19-test: adb1da16e39d4be1ae01e6ec8064e5d897a81a9e
This bug was referenced in samba v4-18-test: 9a5b46d89e2820d447c5e4c9c6a0c67d58962c6e
Closing out bug report. Thanks!
This bug was referenced in samba v4-19-stable (Release samba-4.19.3): adb1da16e39d4be1ae01e6ec8064e5d897a81a9e
This bug was referenced in samba v4-18-stable (Release samba-4.18.9): 9a5b46d89e2820d447c5e4c9c6a0c67d58962c6e