Fwd: [Bug 201869] New: CIFS: block on llistxattr for SMB1
Steve French
smfrench at gmail.com
Tue Dec 4 22:42:20 UTC 2018
On Tue, Dec 4, 2018 at 2:41 PM Jeremy Allison <jra at samba.org> wrote:
>
> On Tue, Dec 04, 2018 at 02:23:16PM -0600, Steve French wrote:
> > This is a Samba server bug - see frame 17 of the trace I attached.
> > The Samba server hung on the level 512 query info (and then hangs
> > again after the client gives up and reconnects etc.).
>
> Yes, smbd doesn't support EA's on symlinks. That's probably not
> going to change in the short term.
I am not worried about supporting EAs on symlinks here, I am worried
about the fact
that the Samba server was hanging (even on reboot Samba wouldn't stop). I doubt
that setfattr was relevant, but the fact that a getfattr hangs is a bad thing.
Basically not supporting EAs on symlinks is not the problem - hanging
on querying symlinks is.
Repro is easy:
Just do "getfattr --absolute-names -dh -m user /mnt2/cifs/src-dir" on a symlink.
I tried it with Ubuntu 4.15 kernel and it hung Samba (server) the same way.
The exact repro steps (in my example /test was exported as
//localhost/test by Samba) were. The only non-default thing needed in
mount is "vers=1.0"
root at smf-Thinkpad-P51:~# mount -t cifs //localhost/test /mnt2
-ousername=testuser,vers=1.0
root at smf-Thinkpad-P51:~# mkdir -m 0777 /test/cifs
root at smf-Thinkpad-P51:~# mkdir /mnt2/cifs/target-dir
root at smf-Thinkpad-P51:~# ln -s /mnt2/cifs/target-dir /mnt2/cifs/src-dir
root at smf-Thinkpad-P51:~# setfattr -h -n user.name /mnt2/cifs/src-dir
setfattr: /mnt2/cifs/src-dir: Operation not permitted
root at smf-Thinkpad-P51:~# getfattr --absolute-names -dh -m user
/mnt2/cifs/src-dir
<hangs on server in smb1 querypathinfo processing>
> > ---------- Forwarded message ---------
> > From: <bugzilla-daemon at bugzilla.kernel.org>
> > Date: Mon, Dec 3, 2018 at 9:36 PM
> > Subject: [Bug 201869] New: CIFS: block on llistxattr for SMB1
> > To: <smfrench at gmail.com>
> >
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=201869
> >
> > Bug ID: 201869
> > Summary: CIFS: block on llistxattr for SMB1
> > Product: File System
> > Version: 2.5
> > Kernel Version: 4.20.0-rc4+
> > Hardware: All
> > OS: Linux
> > Tree: Mainline
> > Status: NEW
> > Severity: high
> > Priority: P1
> > Component: CIFS
> > Assignee: fs_cifs at kernel-bugs.osdl.org
> > Reporter: fengxiaoli0714 at gmail.com
> > Regression: No
> >
> > Mount cifs share with vers=1.0,sfu,actimeo=0. And can't return when execute
> > getfattr a symbol link file.
> >
> > [root at hp-dl360g9-13 ~]# mount |grep cifs1
> > //localhost/cifs on /root/cifs type cifs
> > (rw,relatime,vers=1.0,cache=strict,username=root,uid=0,noforceuid,gid=0,noforcegid,addr=0000:0000:0000:0000:0000:0000:0000:0001,soft,unix,posixpaths,serverino,mapposix,sfu,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=0,user=root)
> > [root at hp-dl360g9-13 ~]# mkdir ~/cifs/dir
> > [root at hp-dl360g9-13 ~]# ln -s ~/cifs/dir ~/cifs/dir2
> > [root at hp-dl360g9-13 ~]# setfattr -h -n user.name ~/cifs/dir2
> > setfattr: /root/cifs1/dir2: Operation not permitted
> > [root at hp-dl360g9-13 ~]# getfattr --absolute-names -dh -m user /root/cifs1/dir2
> >
> > Here can't return.
--
Thanks,
Steve
More information about the samba-technical
mailing list