Ralph Boehme
2023-Oct-04 13:28 UTC
[Samba] Crash on stat() fail with fsp_flags.fstat_before_close
On 10/4/23 13:43, Ratna Bolla (rbolla) via samba wrote:> fd_close() does not reset fsp->fd to -1, if vfs_stat_fsp() call fails for any reason. > This leads to crash when fd_handle_destructor() is called.as pointed out in a private conversation: we have a patch sitting on Jeremy's laptop. To be honest, I already forgot about the details, just remember sitting together with Jeremy banging our heads against this for 2-3 ours until we found the root cause. Iirc what's missing is a test for CI and due to lack of time, this is still sitting in the backlog. Cheers! -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/ SAMBA+ Samba packages https://samba.plus/ SAMBA+ Webinar https://samba.plus/samba-webinars -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20231004/7fe8c2dc/OpenPGP_signature.sig>
Jeremy Allison
2023-Oct-04 16:09 UTC
[Samba] Crash on stat() fail with fsp_flags.fstat_before_close
On Wed, Oct 04, 2023 at 03:28:00PM +0200, Ralph Boehme via samba wrote:>On 10/4/23 13:43, Ratna Bolla (rbolla) via samba wrote: >>fd_close() does not reset fsp->fd to -1, if vfs_stat_fsp() call fails for any reason. >>This leads to crash when fd_handle_destructor() is called. > >as pointed out in a private conversation: we have a patch sitting on >Jeremy's laptop. To be honest, I already forgot about the details, >just remember sitting together with Jeremy banging our heads against >this for 2-3 ours until we found the root cause. Iirc what's missing >is a test for CI and due to lack of time, this is still sitting in the >backlog.Not only do I have the patch, I have most of a test implemented :-). I'll try and find some time to finish it this week and post to CI. Jeremy.