Bug 201869
Summary: | CIFS: block on llistxattr for SMB1 | ||
---|---|---|---|
Product: | File System | Reporter: | Xiaoli Feng (fengxiaoli0714) |
Component: | CIFS | Assignee: | fs_cifs (fs_cifs) |
Status: | NEW --- | ||
Severity: | high | CC: | smfrench |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.20.0-rc4+ | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | samba server hang on smb1 query unix info basic (level 512) |
Description
Xiaoli Feng
2018-12-04 03:36:08 UTC
I was able to reproduce it with your steps. This looks a server bug - see attached wireshark trace, frames 17 and (after the client gave up and reconnected and retried) 107 - the server is hung and not responding. Created attachment 279849 [details]
samba server hang on smb1 query unix info basic (level 512)
I tried it with Ubuntu 4.15 kernel and it hung Samba (server) the same way. The repro steps (in my example /test was exported as //localhost/test by Samba). The only non-default thing needed in mount is "vers=1.0" root@smf-Thinkpad-P51:~# mount -t cifs //localhost/test /mnt2 -ousername=testuser,vers=1.0 root@smf-Thinkpad-P51:~# mkdir -m 0777 /test/cifs root@smf-Thinkpad-P51:~# mkdir /mnt2/cifs/target-dir root@smf-Thinkpad-P51:~# ln -s /mnt2/cifs/target-dir /mnt2/cifs/src-dir root@smf-Thinkpad-P51:~# setfattr -h -n user.name /mnt2/cifs/src-dir setfattr: /mnt2/cifs/src-dir: Operation not permitted root@smf-Thinkpad-P51:~# getfattr --absolute-names -dh -m user /mnt2/cifs/src-dir <hangs on server in smb1 querypathinfo processing> This is probably a user error as well - even if it were fixable on the client the concept is wrong - the client is querying the server for information on a file which the server then sees is a symlink to a file on a cifs mount for which is querying the local machines VFS which then calls out to cifs.ko which sends a request to the same local Samba server which is now blocked on itself. |