Skip to contentSkip to conversation

kernel-5.18.8 breaks cifs mounts

DISCUSSION Julian Sikorski 7 participants 16 messages Jun 30, 2022 – Jul 13, 2022 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi list,

it appears that kernel 5.18.8 breaks cifs mounts on my machine. With 5.18.7, everything works fine. With 5.18.8, I am getting:

$ sudo mount /mnt/openmediavault/
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

The relevant /etc/fstab line is:

//odroidxu4.local/julian /mnt/openmediavault cifs credentials=/home/julas/.credentials,uid=julas,gid=julas,vers=3.1.1,nobrl,_netdev,auto 0 0

Is this a known problem?

Best regards,
Julian

#1 lore raw
Quoted 11 lines · Julian Sikorski

Hi list,

it appears that kernel 5.18.8 breaks cifs mounts on my machine. With 5.18.7, everything works fine. With 5.18.8, I am getting:

$ sudo mount /mnt/openmediavault/
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel
log messages (dmesg)
Quoted 7 lines

The relevant /etc/fstab line is:

//odroidxu4.local/julian /mnt/openmediavault cifs
credentials=/home/julas/.credentials,uid=julas,gid=julas,vers=3.1.1,nobrl,_netdev,auto 0 0

Is this a known problem?

What is the output in dmesg ?

Quoted 3 lines

Best regards,
Julian

#2 lore raw

Am 30.06.22 um 19:02 schrieb ronnie sahlberg:

Quoted 14 lines · Julian Sikorski
Quoted 13 lines

Hi list,

it appears that kernel 5.18.8 breaks cifs mounts on my machine. With 5.18.7, everything works fine. With 5.18.8, I am getting:

$ sudo mount /mnt/openmediavault/
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel
log messages (dmesg)

The relevant /etc/fstab line is:

Quoted 8 lines
Quoted 5 lines

//odroidxu4.local/julian /mnt/openmediavault cifs
credentials=/home/julas/.credentials,uid=julas,gid=julas,vers=3.1.1,nobrl,_netdev,auto 0 0

Is this a known problem?

What is the output in dmesg ?

Not much is there:

Jun 30 18:19:34 snowball3 kernel: CIFS: Attempting to mount \\odroidxu4.local\julian
Jun 30 18:19:34 snowball3 kernel: CIFS: VFS: cifs_mount failed w/return code = -22

I tried reverting 16d5d91 as it was the only commit referencing smb, but it did not help unfortunately.

Best regards,
Julian

#3 lore raw
Quoted 11 lines · Julian Sikorski

Not much is there:

Jun 30 18:19:34 snowball3 kernel: CIFS: Attempting to mount 

\\odroidxu4.local\julian

Jun 30 18:19:34 snowball3 kernel: CIFS: VFS: cifs_mount failed w/return 

code = -22

I tried reverting 16d5d91 as it was the only commit referencing smb, but it did not help unfortunately.

Could you please run

echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control echo 1 > /proc/fs/cifs/cifsFYI
echo 1 > /sys/module/dns_resolver/parameters/debug dmesg --clear
tcpdump -s 0 -w trace.pcap port 445 & pid=$!
mount ...
kill $pid
dmesg > trace.log

and then send trace.log and trace.pcap.

What SMB server and version?

#4 lore raw

Am 30.06.22 um 19:55 schrieb Paulo Alcantara:

Quoted 26 lines
Quoted 11 lines · Julian Sikorski

Not much is there:

Jun 30 18:19:34 snowball3 kernel: CIFS: Attempting to mount

\\odroidxu4.local\julian

Jun 30 18:19:34 snowball3 kernel: CIFS: VFS: cifs_mount failed w/return

code = -22

I tried reverting 16d5d91 as it was the only commit referencing smb, but it did not help unfortunately.

Could you please run

echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control echo 1 > /proc/fs/cifs/cifsFYI
echo 1 > /sys/module/dns_resolver/parameters/debug dmesg --clear
tcpdump -s 0 -w trace.pcap port 445 & pid=$!
mount ...
kill $pid
dmesg > trace.log

Quoted 1 line

and then send trace.log and trace.pcap.

Attached.

Quoted 2 lines

What SMB server and version?

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

Best regards,
Julian

[  862.910364] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'source'
[  862.910381] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'ip'
[  862.910387] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'unc'
[  862.910391] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'vers'
[  862.910395] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'nostrictsync'
[  862.910400] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'uid'
[  862.910405] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'gid'
[  862.910408] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'user'
[  862.910411] CIFS: fs/cifs/fs_context.c: CIFS: parsing cifs mount option 'pass'
[  862.910416] CIFS: fs/cifs/cifsfs.c: Devname: \\odroidxu4.local\julian flags: 0
[  862.910422] CIFS: fs/cifs/connect.c: Username: julas
[  862.910425] CIFS: fs/cifs/connect.c: file mode: 0755  dir mode: 0755
[  862.910431] CIFS: fs/cifs/connect.c: VFS: in mount_get_conns as Xid: 4 with uid: 0
[  862.910435] CIFS: fs/cifs/connect.c: UNC: \\odroidxu4.local\julian
[  862.910441] CIFS: fs/cifs/connect.c: generic_ip_connect: connecting to 192.168.0.220:445
[  862.910462] CIFS: fs/cifs/connect.c: Socket created
[  862.910464] CIFS: fs/cifs/connect.c: sndbuf 16384 rcvbuf 131072 rcvtimeo 0x1b58
[  862.916973] CIFS: fs/cifs/connect.c: cifs_get_tcp_session: next dns resolution scheduled for 600 seconds in the future
[  862.916977] CIFS: fs/cifs/connect.c: Demultiplex PID: 4568
[  862.916982] CIFS: fs/cifs/connect.c: VFS: in cifs_get_smb_ses as Xid: 5 with uid: 0
[  862.916986] CIFS: fs/cifs/connect.c: Existing smb sess not found
[  862.916994] CIFS: fs/cifs/smb2pdu.c: Negotiate protocol
[  862.917003] CIFS: fs/cifs/transport.c: wait_for_free_credits: remove 1 credits total=0
[  862.917023] CIFS: fs/cifs/transport.c: Sending smb: smb_len=236
[  862.964239] CIFS: fs/cifs/connect.c: RFC1002 header 0x49
[  862.964269] CIFS: fs/cifs/smb2misc.c: SMB2 data length 0 offset 0
[  862.964273] CIFS: fs/cifs/smb2misc.c: SMB2 len 73
[  862.964279] CIFS: fs/cifs/smb2ops.c: smb2_add_credits: added 1 credits total=1
[  862.964379] CIFS: fs/cifs/transport.c: cifs_sync_mid_result: cmd=0 mid=0 state=4
[  862.964401] CIFS: fs/cifs/smb2maperror.c: Mapping SMB2 status code 0xc000000d to POSIX err -22
[  862.964416] CIFS: fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[  862.964431] CIFS: fs/cifs/connect.c: VFS: leaving cifs_get_smb_ses (xid = 5) rc = -22
[  862.964442] CIFS: fs/cifs/dfs_cache.c: cache_refresh_path: search path: \odroidxu4.local\julian
[  862.964451] CIFS: fs/cifs/dfs_cache.c: get_dfs_referral: get an DFS referral for \odroidxu4.local\julian
[  862.964478] CIFS: fs/cifs/connect.c: VFS: leaving mount_put_conns (xid = 4) rc = 0
[  862.964482] CIFS: VFS: cifs_mount failed w/return code = -22
#5 lore raw
Quoted 29 lines · Julian Sikorski

Am 30.06.22 um 19:55 schrieb Paulo Alcantara:

Quoted 26 lines
Quoted 11 lines · Julian Sikorski

Not much is there:

Jun 30 18:19:34 snowball3 kernel: CIFS: Attempting to mount

\\odroidxu4.local\julian

Jun 30 18:19:34 snowball3 kernel: CIFS: VFS: cifs_mount failed w/return

code = -22

I tried reverting 16d5d91 as it was the only commit referencing smb, but it did not help unfortunately.

Could you please run

echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control echo 1 > /proc/fs/cifs/cifsFYI
echo 1 > /sys/module/dns_resolver/parameters/debug dmesg --clear
tcpdump -s 0 -w trace.pcap port 445 & pid=$!
mount ...
kill $pid
dmesg > trace.log

Quoted 1 line

and then send trace.log and trace.pcap.

Quoted 7 lines

Attached.

Quoted 2 lines

What SMB server and version?

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

Thanks!

So, it is failing very early during the negproto request:

SMB2 302 Negotiate Protocol Request
SMB2 143 Negotiate Protocol Response, Error: STATUS_INVALID_PARAMETER

which seems related to these commits in v5.18.8

16d5d9100927 smb3: use netname when available on secondary channels ca83f50b43a0 smb3: fix empty netname context on secondary channels

Have you tried reverting both in v5.18.8 to see if it works?

I built v5.18.8 but couldn't reproduce it against w22 server, though.

#6 lore raw

Am 30.06.22 um 20:28 schrieb Paulo Alcantara:

Quoted 46 lines
Quoted 29 lines · Julian Sikorski

Am 30.06.22 um 19:55 schrieb Paulo Alcantara:

Quoted 26 lines
Quoted 11 lines · Julian Sikorski

Not much is there:

Jun 30 18:19:34 snowball3 kernel: CIFS: Attempting to mount

\\odroidxu4.local\julian

Jun 30 18:19:34 snowball3 kernel: CIFS: VFS: cifs_mount failed w/return

code = -22

I tried reverting 16d5d91 as it was the only commit referencing smb, but it did not help unfortunately.

Could you please run

echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control echo 1 > /proc/fs/cifs/cifsFYI
echo 1 > /sys/module/dns_resolver/parameters/debug dmesg --clear
tcpdump -s 0 -w trace.pcap port 445 & pid=$!
mount ...
kill $pid
dmesg > trace.log

Quoted 1 line

and then send trace.log and trace.pcap.

Quoted 7 lines

Attached.

Quoted 2 lines

What SMB server and version?

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

Thanks!

So, it is failing very early during the negproto request:

SMB2 302 Negotiate Protocol Request
SMB2 143 Negotiate Protocol Response, Error: STATUS_INVALID_PARAMETER

Quoted 8 lines

which seems related to these commits in v5.18.8

16d5d9100927 smb3: use netname when available on secondary channels ca83f50b43a0 smb3: fix empty netname context on secondary channels

Have you tried reverting both in v5.18.8 to see if it works?

I built v5.18.8 but couldn't reproduce it against w22 server, though.

Good catch! I only noticed

16d5d9100927 smb3: use netname when available on secondary channels

initally, and reverting it did not help. Reverting

ca83f50b43a0 smb3: fix empty netname context on secondary channels

makes the mounts work again.

Best regards,
Julian

#7 lore raw
Quoted 2 lines · Julian Sikorski
Quoted 2 lines
Quoted 2 lines

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

[ ... ]

Quoted 7 lines

16d5d9100927 smb3: use netname when available on secondary channels

initally, and reverting it did not help. Reverting

ca83f50b43a0 smb3: fix empty netname context on secondary channels

makes the mounts work again.

It's possible that server is not discarding/ignoring SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiate context as it should, and rather treating it as an error.

I took a quick look in SLE15-SP3 samba 4.15 code and I didn't spot any obvious mishandling there (it seems it's not supported yet). Also I couldn't reproduce the issue with that server.

Maybe it's possible it's a vendor modification?

Cheers,

Enzo

#8 lore raw
Quoted 22 lines · Enzo Matsumiya
Quoted 2 lines · Julian Sikorski
Quoted 2 lines
Quoted 2 lines

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

[ ... ]

Quoted 7 lines

16d5d9100927 smb3: use netname when available on secondary channels

initally, and reverting it did not help. Reverting

ca83f50b43a0 smb3: fix empty netname context on secondary channels

makes the mounts work again.

It's possible that server is not discarding/ignoring SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiate context as it should, and rather treating it as an error.

I took a quick look in SLE15-SP3 samba 4.15 code and I didn't spot any obvious mishandling there (it seems it's not supported yet). Also I couldn't reproduce the issue with that server.

Quoted 6 lines

Maybe it's possible it's a vendor modification?

Cheers,

Enzo

I tried mounting a samba share, and it seems to work fine.

From the network capture attached, I see that the netname is not empty, and seems fine.
Negotiate Context: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID

    Type: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID (0x0005)
    DataLength: 30
    Reserved: 00000000
    Netname: odroidxu4.local

Julian,
Will you be able to capture network traces with the two changes reverted? i.e. when it works for you?

Signature · 2 lines
Regards,
Shyam
#9 lore raw

Am 04.07.22 um 10:12 schrieb Shyam Prasad N:

Quoted 35 lines · Enzo Matsumiya
Quoted 22 lines · Julian Sikorski
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Openmediavault 6.0.30 running on top of armbian bullseye. The samba package version is 4.13.13+dfsg-1~deb11u3.

[ ... ]

Quoted 7 lines

16d5d9100927 smb3: use netname when available on secondary channels

initally, and reverting it did not help. Reverting

ca83f50b43a0 smb3: fix empty netname context on secondary channels

makes the mounts work again.

It's possible that server is not discarding/ignoring SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiate context as it should, and rather treating it as an error.

I took a quick look in SLE15-SP3 samba 4.15 code and I didn't spot any obvious mishandling there (it seems it's not supported yet). Also I couldn't reproduce the issue with that server.

Quoted 6 lines

Maybe it's possible it's a vendor modification?

Cheers,

Enzo

I tried mounting a samba share, and it seems to work fine.

From the network capture attached, I see that the netname is not
empty, and seems fine.
Negotiate Context: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID

Quoted 9 lines
     Type: SMB2_NETNAME_NEGOTIATE_CONTEXT_ID (0x0005)
     DataLength: 30
     Reserved: 00000000
     Netname: odroidxu4.local

Julian,
Will you be able to capture network traces with the two changes reverted? i.e. when it works for you?

Looks like some messages were not CCed to the list, apologies. Please find the traces attached.

Best regards,
Julian

A message that is not in the archive (sent off-list or not yet received): CAH2r5mtVwZggJ9Fi0zsK5hCci4uxee-kOSC3brb56xpb0_xn7w@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAH2r5mvoyhZGjf_wgvjgmkCz=+2iDxCSpbyJ79NMtpE1Ecjdnw@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 24 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Quoted 8 lines

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

that went only into 4.15 and higher.

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

#15 lore raw
Quoted 35 lines · Julian Sikorski

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 31 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

that went only into 4.15 and higher.

Quoted 8 lines
Quoted 1 line

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

Hi Metze,
I went through the above patch, and it looks like an issue with parsing garbage at the end of the buffer, rather than negotiate count. I'm not sure how the netname negotiate context patches above are being affected by this samba server patch. The only difference from the client side for single channel is that the netname context appears as the 4th element in the list of 4, rather than the 3rd element in the list of 4. Do you have a possible explanation?

Julian,
Thanks for the repro attempt. So I assume that with the latest samba server, things work as expected without reverting any changes in 5.18.8 kernel, correct?

Signature · 2 lines
Regards,
Shyam
#16 lore raw

Am 05.07.22 um 07:28 schrieb Shyam Prasad N:

Quoted 54 lines · Julian Sikorski
Quoted 35 lines

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 31 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

that went only into 4.15 and higher.

Quoted 8 lines
Quoted 1 line

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

Hi Metze,
I went through the above patch, and it looks like an issue with parsing garbage at the end of the buffer, rather than negotiate count. I'm not sure how the netname negotiate context patches above are being affected by this samba server patch. The only difference from the client side for single channel is that the netname context appears as the 4th element in the list of 4, rather than the 3rd element in the list of 4. Do you have a possible explanation?

Quoted 5 lines

Julian,
Thanks for the repro attempt. So I assume that with the latest samba server, things work as expected without reverting any changes in 5.18.8 kernel, correct?

I have no way of testing a newer samba server unfortunately, but several people in this email discussion have mentioned that newer servers work for them:
- Paulo with W22
- Enzo and Steve with 4.15
- Steve with 4.16 without https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

Best regards,
Julian

#17 lore raw
In reply to Julian Sikorski

Am 04.07.22 um 18:29 schrieb Julian Sikorski:

Quoted 32 lines

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 29 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

Quoted 8 lines
Quoted 3 lines

that went only into 4.15 and higher.

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

I have now filed a bug against debian samba package:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014453

Best regards,
Julian

#18 lore raw

I was able to reproduce it to older Samba server (4.12.5) and could workaround the Samba server bug by using mount option "compress" on the client (which won't do anything different since it is not supported but interestingly it avoids the problem by adding another context at the end).

Quoted 49 lines · Julian Sikorski

Am 04.07.22 um 18:29 schrieb Julian Sikorski:

Quoted 34 lines

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 31 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

that went only into 4.15 and higher.

Quoted 8 lines
Quoted 1 line

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

I have now filed a bug against debian samba package:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014453

Best regards,
Julian

Signature · 3 lines
Thanks,

Steve
#19 lore raw

Hi,

Am 12.07.22 um 06:36 schrieb Steve French:

Quoted 5 lines

I was able to reproduce it to older Samba server (4.12.5) and could workaround the Samba server bug by using mount option "compress" on the client (which won't do anything different since it is not supported but interestingly it avoids the problem by adding another context at the end).

The general problem might be solved by just moving the now optional hostname context in fs/cifs/smb2pdu.c back between build_encrypt_ctxt and build_posix_ctxt.

I encounter the issue with a Synology Diskstation, and there might be much more people running into the problem when this kernel becomes more common...

Quoted 53 lines · Julian Sikorski
Quoted 49 lines

Am 04.07.22 um 18:29 schrieb Julian Sikorski:

Quoted 34 lines

Am 03.07.22 um 19:51 schrieb Stefan Metzmacher:

Quoted 31 lines

Am 03.07.22 um 07:01 schrieb Steve French:

Quoted 15 lines

I lean toward thinking that this is a Samba bug (although I don't see it on my local system - it works to samba for me, although I was trying against a slightly different version, Samba 4.15.5-Ubuntu).

Looking at the traces in more detail they look the same (failing vs. working) other than the order of the negotiate context, which fails with POSIX as the 3rd context, and netname as the 4th, but works with the order reversed (although same contexts, and same overall length) ie with POSIX context as the fourth one and netname context as the third one.

The failing server code in Samba is in smbd_smb2_request_process_negprot but I don't see changes to it recently around this error.

Quoted 7 lines

Does this fail to anyone else's Samba version?

This is probably a Samba server bug but ... seems odd since it doesn't fail to Samba for me.

Jeremy/Metze,
Does this look familiar?

Maybe this one:

https://git.samba.org/?p=samba.git;a=commitdiff;h=147dd9d58a429695a3b6c6e45c8b0eaafc67908a

that went only into 4.15 and higher.

Quoted 8 lines
Quoted 1 line

metze

Nice catch, I can confirm that adding this patch to debian samba 2:4.13.13+dfsg-1~deb11u3 package makes the mounts work again. How do we get this patch into debian?

Best regards,
Julian

I have now filed a bug against debian samba package:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014453

Best regards,
Julian