Bug 209669

Summary: oops in smb3_receive_transform
Product: File System Reporter: abma (spam)
Component: CIFSAssignee: fs_cifs (fs_cifs)
Status: NEW ---    
Severity: normal CC: nspmangalore
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Debian 5.8.10-1~bpo10+1 Subsystem:
Regression: No Bisected commit-id:
Attachments: output of dmesg

Description abma 2020-10-14 07:52:29 UTC
Created attachment 292951 [details]
output of dmesg

we get i would say weekly crash in smb3_receive_transform:

Call Trace:
smb3_receive_transform+0x120/0x870 [cifs]
cifs_demultiplex_thread+0xb53/0xc20 [cifs]
? cifs_handle_standard+0x190/0x190 [cifs]
kthread+0x116/0x130
? kthread_park+0x80/0x80
ret_from_fork+0x1f/0x30


share is mounted with:

//hostname/data on /mnt/data type cifs (rw,relatime,vers=3.0,sec=ntlmsspi,cache=strict,multiuser,domain=swcznet2000,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.101.241,file_mode=0755,dir_mode=0755,seal,soft,nounix,mapposix,nohandlecache,noperm,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)



an idea whats causing this?

with kernel version 4.19 we got similar crashes.
Comment 1 Shyam Prasad N 2020-10-14 17:22:29 UTC
I'm guessing that this happens when crypt_message() does not find the matching session. Success is returned, without decrypting the data. Will dig into it more.
Comment 2 abma 2020-10-16 06:05:06 UTC
some guesses:

it seems, the oops seems to have started when more sessions (>10) where active and the host had longer uptimes (>24h).

As "seal" seems non-standard i removed the mount parameter to avoid the oops.

If the oops happens again, what can i do to better investigate the cause of the crash?

The affected kernel is running as KVM-VM.
Comment 3 Shyam Prasad N 2020-10-16 13:29:45 UTC
I believe the issue will be fixed by the fix mentioned above. 
The fix is already into the next kernel release. 

If it is possible for you to build the kernel from source, I can share the patch with you and you could verify that the fix works. I've already tested this by simulating the error. But nothing like testing in real-world, if it's happening consistently.