Public bug reported: **Package:** samba **Ubuntu:** 24.04.4 LTS (Noble) **Architecture:** amd64 **Installed version:** `2:4.19.5+dfsg-4ubuntu9.7`
### Problem Samba in Ubuntu 24.04.4 LTS reproduces upstream Samba Bug 15527 when an SMB share is backed by a mergerfs/FUSE filesystem. I have a share at `/mnt/data`, which is: ``` /mnt/data mergerfs fuse.mergerfs rw,...,allow_other ``` A SKYBOX VR client connects over SMB and can browse and play files normally. When it attempts to delete a file: 1. The file is actually deleted from the filesystem. 2. Samba returns `NT_STATUS_ACCESS_DENIED` during SMB2 CLOSE. 3. `smbd` then hits the `fd_handle_destructor()` assertion and panics. 4. SKYBOX reports "Failed to delete", although the file has already disappeared. The relevant stock Samba 4.19.5 log was: ``` ratcliffes opened file media/TV Shows/The Wonder Years/aaa.jpg read=No write=No ratcliffes closed file media/TV Shows/The Wonder Years/aaa.jpg (numopen=0) NT_STATUS_ACCESS_DENIED PANIC: assert failed at source3/smbd/fd_handle.c (fh->fd == -1) || (fh->fd == AT_FDCWD) ``` This corresponds directly to upstream Samba Bug 15527, which is documented as: ``` fd_handle_destructor() panics within an smbd_smb2_close() if vfs_stat_fsp() fails in fd_close() ``` The bug was fixed upstream in Samba 4.19.6. ### Verification I built Ubuntu's existing 4.19.5+dfsg-4ubuntu9.7 source package with the upstream Bug 15527 fix applied, retaining Ubuntu's existing patch stack. The fix consists of the two upstream changes to `close.c` and `open.c`, including resetting: ``` fsp->fsp_flags.fstat_before_close = false; ``` and ensuring the file descriptor is closed even when `vfs_stat_fsp()` fails. I installed the resulting packages and repeated the exact same SKYBOX deletion test. **Result:** the file was deleted successfully and SKYBOX reported successful deletion. There was no `fd_handle_destructor` assertion or smbd panic. ### Request Please consider backporting the upstream Samba 4.19.6 Bug 15527 fix into the Ubuntu 24.04.4 LTS Samba package. This appears particularly relevant to users using Samba shares backed by FUSE filesystems such as mergerfs... especially because this is a prominent bug in an LTS release. Upstream Samba 4.19.6 release notes identify Bug 15527 as fixed: https://www.samba.org/samba/history/samba-4.19.6.html The current Noble package remains 4.19.5: `2:4.19.5+dfsg-4ubuntu9.7` ** Affects: samba (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2166678 Title: Samba 4.19.5 in Ubuntu 24.04.4 LTS hits upstream Bug 15527 with mergerfs/FUSE, causing SMB2 CLOSE failure and smbd panic To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2166678/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
