smbd dumps core whed accessing manualy mounted fs
Description
Problem/Justification
Impact
Activity
Matus November 25, 2021 at 1:13 PMEdited
the same crash happens when .zfs directory for dataset is accessed through samba
Matus November 22, 2021 at 9:21 PM
I now understand this is not supported feature. I just needed to copy some data from ext3 disk, tried my experimental TrueNAS installation and found it was way too slow. Only later I found out that smbd crashed, so I submitted this ticket. If non zfs fs export is denied at vfs level, this should prevent any other users like me to cause smbd to crash, which is a good thing I think, that was the purpose of this ticket.
thanks for great piece of software guys!
Andrew Walker November 22, 2021 at 8:45 PM
But that said, we will not support exporting ext3/4 over SMB in SCALE.
Andrew Walker November 22, 2021 at 8:44 PM
As I mentioned this is a multi-step fix. First off is to actively discourage users from doing unsupported things. We do not support exporting ext3 filesystems over SMB.
The NULL deref and samba crash is fixed in the github PR against the samba repo for the vfs module that handles zfs integration. I'm somewhat inclined to simply assert in the module if we hit an FS that isn't ZFS because in general behavior will not be well-defined.
Matus November 22, 2021 at 8:35 PMEdited
not sure if this patch prevents mentioned core dump. the error can be reproduced as follows:
share any VALID zfs dataset, for eample
/mnt/pool_data/my_data
mkdir /mnt/pool_data/my_data/mnt
mount -t ext3 /dev/sdb1 /mnt/pool_data/my_data/mnt
access
\\nas\my_data\mnt
using windows explorer. core dumped.
created and shared "dataset", then created "mnt" directory in the shared "dataset", mounted ext3 partition in the "mnt" directory in shared "dataset".
when this share is accessed, smbd dumps core, restarts and runs until cd is performed in samba client.
/usr/sbin/smbd (Thu Nov 18 15:49:04 2021), /usr/sbin/smbd (Thu Nov 18 15:49:04 2021), /usr/sbin/smbd (Thu Nov 18 15:49:05 2021), /usr/sbin/smbd (Thu Nov 18 15:49:05 2021), /usr/sbin/smbd (Thu Nov 18 15:49:06 2021), /usr/sbin/smbd (Thu Nov 18 15:49:06 2021), /usr/sbin/smbd (Thu Nov 18 15:49:07 2021), /usr/sbin/smbd (Thu Nov 18 15:49:07 2021). Please create a ticket at https://jira.ixsystems.com/ and attach the relevant core files along with a system debug. Once the core files have been archived and attached to the ticket, they may be removed by running the following command in shell: 'rm /var/db/system/cores/*'.
2021-11-18 15:49:12 (Europe/Amsterdam)