* kernel-5.18.8 breaks cifs mounts @ 2022-06-30 16:47 Julian Sikorski 2022-06-30 17:02 ` ronnie sahlberg 0 siblings, 1 reply; 16+ messages in thread From: Julian Sikorski @ 2022-06-30 16:47 UTC (permalink / raw) To: CIFS 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 16:47 kernel-5.18.8 breaks cifs mounts Julian Sikorski @ 2022-06-30 17:02 ` ronnie sahlberg 2022-06-30 17:41 ` Julian Sikorski 0 siblings, 1 reply; 16+ messages in thread From: ronnie sahlberg @ 2022-06-30 17:02 UTC (permalink / raw) To: Julian Sikorski; +Cc: CIFS On Fri, 1 Jul 2022 at 03:00, Julian Sikorski <belegdol@gmail.com> wrote: > > 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? What is the output in dmesg ? > > Best regards, > Julian ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 17:02 ` ronnie sahlberg @ 2022-06-30 17:41 ` Julian Sikorski 2022-06-30 17:55 ` Paulo Alcantara 0 siblings, 1 reply; 16+ messages in thread From: Julian Sikorski @ 2022-06-30 17:41 UTC (permalink / raw) To: ronnie sahlberg; +Cc: CIFS Am 30.06.22 um 19:02 schrieb ronnie sahlberg: > On Fri, 1 Jul 2022 at 03:00, Julian Sikorski <belegdol@gmail.com> wrote: >> >> 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? > > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 17:41 ` Julian Sikorski @ 2022-06-30 17:55 ` Paulo Alcantara 2022-06-30 18:11 ` Julian Sikorski 0 siblings, 1 reply; 16+ messages in thread From: Paulo Alcantara @ 2022-06-30 17:55 UTC (permalink / raw) To: Julian Sikorski, ronnie sahlberg; +Cc: CIFS Julian Sikorski <belegdol@gmail.com> writes: > 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? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 17:55 ` Paulo Alcantara @ 2022-06-30 18:11 ` Julian Sikorski 2022-06-30 18:28 ` Paulo Alcantara 0 siblings, 1 reply; 16+ messages in thread From: Julian Sikorski @ 2022-06-30 18:11 UTC (permalink / raw) To: Paulo Alcantara, ronnie sahlberg; +Cc: CIFS [-- Attachment #1: Type: text/plain, Size: 1011 bytes --] Am 30.06.22 um 19:55 schrieb Paulo Alcantara: > Julian Sikorski <belegdol@gmail.com> writes: > >> 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. Attached. > > 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 [-- Attachment #2: trace.log --] [-- Type: text/x-log, Size: 2868 bytes --] [ 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 [-- Attachment #3: trace.pcap --] [-- Type: application/vnd.tcpdump.pcap, Size: 1173 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 18:11 ` Julian Sikorski @ 2022-06-30 18:28 ` Paulo Alcantara 2022-06-30 19:12 ` Julian Sikorski 0 siblings, 1 reply; 16+ messages in thread From: Paulo Alcantara @ 2022-06-30 18:28 UTC (permalink / raw) To: Julian Sikorski, ronnie sahlberg; +Cc: CIFS Julian Sikorski <belegdol@gmail.com> writes: > Am 30.06.22 um 19:55 schrieb Paulo Alcantara: >> Julian Sikorski <belegdol@gmail.com> writes: >> >>> 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. > > Attached. > >> >> 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. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 18:28 ` Paulo Alcantara @ 2022-06-30 19:12 ` Julian Sikorski 2022-06-30 20:32 ` Enzo Matsumiya 0 siblings, 1 reply; 16+ messages in thread From: Julian Sikorski @ 2022-06-30 19:12 UTC (permalink / raw) To: Paulo Alcantara, ronnie sahlberg; +Cc: CIFS Am 30.06.22 um 20:28 schrieb Paulo Alcantara: > Julian Sikorski <belegdol@gmail.com> writes: > >> Am 30.06.22 um 19:55 schrieb Paulo Alcantara: >>> Julian Sikorski <belegdol@gmail.com> writes: >>> >>>> 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. >> >> Attached. >> >>> >>> 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. 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 19:12 ` Julian Sikorski @ 2022-06-30 20:32 ` Enzo Matsumiya 2022-07-04 8:12 ` Shyam Prasad N [not found] ` <CAH2r5mtVwZggJ9Fi0zsK5hCci4uxee-kOSC3brb56xpb0_xn7w@mail.gmail.com> 0 siblings, 2 replies; 16+ messages in thread From: Enzo Matsumiya @ 2022-06-30 20:32 UTC (permalink / raw) To: Julian Sikorski; +Cc: Paulo Alcantara, ronnie sahlberg, CIFS On 06/30, Julian Sikorski wrote: >>>Openmediavault 6.0.30 running on top of armbian bullseye. The samba >>>package version is 4.13.13+dfsg-1~deb11u3. [ ... ] >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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-06-30 20:32 ` Enzo Matsumiya @ 2022-07-04 8:12 ` Shyam Prasad N 2022-07-04 16:30 ` Julian Sikorski [not found] ` <CAH2r5mtVwZggJ9Fi0zsK5hCci4uxee-kOSC3brb56xpb0_xn7w@mail.gmail.com> 1 sibling, 1 reply; 16+ messages in thread From: Shyam Prasad N @ 2022-07-04 8:12 UTC (permalink / raw) To: Enzo Matsumiya; +Cc: Julian Sikorski, Paulo Alcantara, ronnie sahlberg, CIFS On Fri, Jul 1, 2022 at 2:07 AM Enzo Matsumiya <ematsumiya@suse.de> wrote: > > On 06/30, Julian Sikorski wrote: > >>>Openmediavault 6.0.30 running on top of armbian bullseye. The samba > >>>package version is 4.13.13+dfsg-1~deb11u3. > > [ ... ] > > >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 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? -- Regards, Shyam ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-04 8:12 ` Shyam Prasad N @ 2022-07-04 16:30 ` Julian Sikorski 0 siblings, 0 replies; 16+ messages in thread From: Julian Sikorski @ 2022-07-04 16:30 UTC (permalink / raw) To: Shyam Prasad N, Enzo Matsumiya; +Cc: Paulo Alcantara, ronnie sahlberg, CIFS [-- Attachment #1: Type: text/plain, Size: 1578 bytes --] Am 04.07.22 um 10:12 schrieb Shyam Prasad N: > On Fri, Jul 1, 2022 at 2:07 AM Enzo Matsumiya <ematsumiya@suse.de> wrote: >> >> On 06/30, Julian Sikorski wrote: >>>>> Openmediavault 6.0.30 running on top of armbian bullseye. The samba >>>>> package version is 4.13.13+dfsg-1~deb11u3. >> >> [ ... ] >> >>> 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 > > 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? > Looks like some messages were not CCed to the list, apologies. Please find the traces attached. Best regards, Julian [-- Attachment #2: trace_reverted.pcap --] [-- Type: application/vnd.tcpdump.pcap, Size: 17839 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <CAH2r5mtVwZggJ9Fi0zsK5hCci4uxee-kOSC3brb56xpb0_xn7w@mail.gmail.com>]
[parent not found: <56afe80b-bf6a-2508-063a-7b091cdbbe0f@gmail.com>]
[parent not found: <CAH2r5mvoyhZGjf_wgvjgmkCz=+2iDxCSpbyJ79NMtpE1Ecjdnw@mail.gmail.com>]
[parent not found: <fccdb4af-697e-b7fc-6421-f16e9b35bb8e@samba.org>]
* Re: kernel-5.18.8 breaks cifs mounts [not found] ` <fccdb4af-697e-b7fc-6421-f16e9b35bb8e@samba.org> @ 2022-07-04 16:29 ` Julian Sikorski 2022-07-05 5:28 ` Shyam Prasad N 2022-07-06 11:18 ` Julian Sikorski 0 siblings, 2 replies; 16+ messages in thread From: Julian Sikorski @ 2022-07-04 16:29 UTC (permalink / raw) To: Stefan Metzmacher, Steve French, Jeremy Allison Cc: Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: > Am 03.07.22 um 07:01 schrieb Steve French: >> 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. >> >> 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. > > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-04 16:29 ` Julian Sikorski @ 2022-07-05 5:28 ` Shyam Prasad N 2022-07-05 10:55 ` Julian Sikorski 2022-07-06 11:18 ` Julian Sikorski 1 sibling, 1 reply; 16+ messages in thread From: Shyam Prasad N @ 2022-07-05 5:28 UTC (permalink / raw) To: Julian Sikorski Cc: Stefan Metzmacher, Steve French, Jeremy Allison, Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS On Mon, Jul 4, 2022 at 10:03 PM Julian Sikorski <belegdol@gmail.com> wrote: > > > > Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: > > Am 03.07.22 um 07:01 schrieb Steve French: > >> 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. > >> > >> 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. > > > > 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? -- Regards, Shyam ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-05 5:28 ` Shyam Prasad N @ 2022-07-05 10:55 ` Julian Sikorski 0 siblings, 0 replies; 16+ messages in thread From: Julian Sikorski @ 2022-07-05 10:55 UTC (permalink / raw) To: Shyam Prasad N Cc: Stefan Metzmacher, Steve French, Jeremy Allison, Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS Am 05.07.22 um 07:28 schrieb Shyam Prasad N: > On Mon, Jul 4, 2022 at 10:03 PM Julian Sikorski <belegdol@gmail.com> wrote: >> >> >> >> Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: >>> Am 03.07.22 um 07:01 schrieb Steve French: >>>> 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. >>>> >>>> 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. >>> >>> 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? > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-04 16:29 ` Julian Sikorski 2022-07-05 5:28 ` Shyam Prasad N @ 2022-07-06 11:18 ` Julian Sikorski 2022-07-12 4:36 ` Steve French 1 sibling, 1 reply; 16+ messages in thread From: Julian Sikorski @ 2022-07-06 11:18 UTC (permalink / raw) To: Stefan Metzmacher, Steve French, Jeremy Allison Cc: Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS Am 04.07.22 um 18:29 schrieb Julian Sikorski: > > > Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: >> Am 03.07.22 um 07:01 schrieb Steve French: >>> 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. >>> >>> 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. >> >> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-06 11:18 ` Julian Sikorski @ 2022-07-12 4:36 ` Steve French 2022-07-13 21:25 ` Georg Müller 0 siblings, 1 reply; 16+ messages in thread From: Steve French @ 2022-07-12 4:36 UTC (permalink / raw) To: Julian Sikorski Cc: Stefan Metzmacher, Jeremy Allison, Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS 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). On Wed, Jul 6, 2022 at 6:18 AM Julian Sikorski <belegdol@gmail.com> wrote: > > Am 04.07.22 um 18:29 schrieb Julian Sikorski: > > > > > > Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: > >> Am 03.07.22 um 07:01 schrieb Steve French: > >>> 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. > >>> > >>> 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. > >> > >> 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 -- Thanks, Steve ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: kernel-5.18.8 breaks cifs mounts 2022-07-12 4:36 ` Steve French @ 2022-07-13 21:25 ` Georg Müller 0 siblings, 0 replies; 16+ messages in thread From: Georg Müller @ 2022-07-13 21:25 UTC (permalink / raw) To: Steve French, Julian Sikorski Cc: Stefan Metzmacher, Jeremy Allison, Enzo Matsumiya, Paulo Alcantara, ronnie sahlberg, CIFS Hi, Am 12.07.22 um 06:36 schrieb Steve French: > 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... > On Wed, Jul 6, 2022 at 6:18 AM Julian Sikorski <belegdol@gmail.com> wrote: >> >> Am 04.07.22 um 18:29 schrieb Julian Sikorski: >>> >>> >>> Am 03.07.22 um 19:51 schrieb Stefan Metzmacher: >>>> Am 03.07.22 um 07:01 schrieb Steve French: >>>>> 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. >>>>> >>>>> 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. >>>> >>>> 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 > > > ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-07-13 21:25 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-30 16:47 kernel-5.18.8 breaks cifs mounts Julian Sikorski 2022-06-30 17:02 ` ronnie sahlberg 2022-06-30 17:41 ` Julian Sikorski 2022-06-30 17:55 ` Paulo Alcantara 2022-06-30 18:11 ` Julian Sikorski 2022-06-30 18:28 ` Paulo Alcantara 2022-06-30 19:12 ` Julian Sikorski 2022-06-30 20:32 ` Enzo Matsumiya 2022-07-04 8:12 ` Shyam Prasad N 2022-07-04 16:30 ` Julian Sikorski [not found] ` <CAH2r5mtVwZggJ9Fi0zsK5hCci4uxee-kOSC3brb56xpb0_xn7w@mail.gmail.com> [not found] ` <56afe80b-bf6a-2508-063a-7b091cdbbe0f@gmail.com> [not found] ` <CAH2r5mvoyhZGjf_wgvjgmkCz=+2iDxCSpbyJ79NMtpE1Ecjdnw@mail.gmail.com> [not found] ` <fccdb4af-697e-b7fc-6421-f16e9b35bb8e@samba.org> 2022-07-04 16:29 ` Julian Sikorski 2022-07-05 5:28 ` Shyam Prasad N 2022-07-05 10:55 ` Julian Sikorski 2022-07-06 11:18 ` Julian Sikorski 2022-07-12 4:36 ` Steve French 2022-07-13 21:25 ` Georg Müller
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.