Comment 0 for bug 1821053

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hi,

with a simple smb.conf setup like this:
[pub]
path = /pub
guest ok = yes

The following mount command fails when the running kernel is 5.0.0-7:
root@ubuntu:~# dmesg -C
root@ubuntu:~# mount //localhost/pub /mnt -o guest
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@ubuntu:~# dmesg
[ 178.469307] CIFS: Attempting to mount //localhost/pub
[ 178.469343] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[ 178.481741] CIFS VFS: failed to connect to IPC (rc=-13)
[ 178.485272] CIFS VFS: cifs_mount failed w/return code = -13

samba server logs, in debug 5, show:
[2019/03/20 17:25:19.365445, 0] ../../libcli/smb/smb2_signing.c:169(smb2_signing_check_pdu)
  Bad SMB2 signature for message
[2019/03/20 17:25:19.365524, 0] ../../lib/util/util.c:508(dump_data)
  [0000] A6 62 5F 50 9C D7 31 42 14 34 52 9F AA 49 C8 31 .b_P..1B .4R..I.1
[2019/03/20 17:25:19.365562, 0] ../../lib/util/util.c:508(dump_data)
  [0000] 31 37 12 A2 D5 D4 59 99 0B 63 C5 21 EB 86 70 74 17....Y. .c.!..pt
[2019/03/20 17:25:19.369055, 0] ../../libcli/smb/smb2_signing.c:169(smb2_signing_check_pdu)
  Bad SMB2 signature for message
[2019/03/20 17:25:19.369092, 0] ../../lib/util/util.c:508(dump_data)
  [0000] 23 2C 4F 10 0E 4E 46 2E 8A 5B E3 70 0F B3 D3 FB #,O..NF. .[.p....
[2019/03/20 17:25:19.369120, 0] ../../lib/util/util.c:508(dump_data)
  [0000] 50 F7 C6 8A 6E BC B2 B7 1C 2F 43 30 90 6A 25 CA P...n... ./C0.j%.

With kernel 4.19.0-12-generic, the exact same system, the command works:

root@ubuntu:~# dmesg -C

root@ubuntu:~# mount //localhost/pub /mnt -o guest

root@ubuntu:~# dmesg
[ 277.745885] FS-Cache: Loaded
[ 277.768408] FS-Cache: Netfs 'cifs' registered for caching
[ 277.768495] Key type cifs.spnego registered
[ 277.768498] Key type cifs.idmap registered
[ 277.768707] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.

root@ubuntu:~# mount -t cifs
//localhost/pub on /mnt type cifs (rw,relatime,vers=default,sec=none,cache=strict,uid=0,noforceuid,gid=0,noforcegid,addr=127.0.0.1,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)

root@ubuntu:~# uname -r
4.19.0-12-generic

Just looking at the list of patches queued up for the next upstream kernel release, at https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.0, this one looks promising:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.0/cifs-do-not-skip-smb2-message-ids-on-send-failures.patch

I can easily test a new kernel for you.