This is really subtle. If someone passes in an smb_fname where smb_fname actually is taken from fsp->fsp_name, then the lifetime of these objects is meant to be the same. This is commonly the case from an SMB1 path-based call (eg call_trans2qfilepathinfo) where we use the pathref fsp (smb_fname->fsp) as the handle. In this case we must not unlink smb_fname->fsp from it's owner. The asserts below: SMB_ASSERT(fsp->fsp_name->fsp != NULL); SMB_ASSERT(fsp->fsp_name->fsp == fsp); ensure the required invarients are met. Have fix, need bugnumber.
Passes ci here: https://gitlab.com/samba-team/devel/samba/-/pipelines/317125524
This bug was referenced in samba master: 8a427783e5e780d3ffbe4f9710ac4a17c483ca33
Created attachment 16644 [details] git-am fix for 4.14.next. Cherry-picked from master.
Reassigning to Karolin for inclusion in 4.14.
*** Bug 14733 has been marked as a duplicate of this bug. ***
Pushed to autobuild-v4-14-test.
This bug was referenced in samba v4-14-test: 42fa9f800fd008881c70cf37e63954f5987d0c78
Pushed, closing out bug report. Thanks!
This bug was referenced in samba v4-14-stable (Release samba-4.14.6): 42fa9f800fd008881c70cf37e63954f5987d0c78