Hi Kleber,

I tested the Xenial kernel from -proposed and got the following crash:

Jul 13 14:38:05 ubuntu-vm kernel: [  770.262084] BUG: unable to handle kernel 
NULL pointer dereference at           (null)
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262087] IP: [<ffffffffc034151c>] 
cifs_discard_remaining_data+0xc/0x70 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262098] PGD 7db4fb067 PUD 7d5e3a067 
PMD 0
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262100] Oops: 0000 [#1] SMP
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262340] Modules linked in: cifs drbg 
ansi_cprng cmac arc4 md4 nls_utf8 ccm fscache crct10dif_pclmul crc32_pclmul 
ghash_clmulni_intel aesni_intel i2c_piix4 aes_x86_64 8250_fintek lrw hyperv_fb 
gf128mul hv_balloon glue_helper ablk_helper cryptd input_leds serio_raw joydev 
mac_hid nfsd auth_rpcgss nfs_acl lockd grace sunrpc parport_pc ppdev lp parport 
autofs4 hid_generic hv_netvsc hv_utils ptp hid_hyperv hv_storvsc pps_core hid 
scsi_transport_fc hyperv_keyboard psmouse pata_acpi hv_vmbus floppy fjes [last 
unloaded: cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262360] CPU: 2 PID: 18568 Comm: cifsd 
Not tainted 4.4.0-85-generic #108-Ubuntu
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262361] Hardware name: Microsoft 
Corporation Virtual Machine/Virtual Machine, BIOS 090006  01/06/2017
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262362] task: ffff8807e1440f00 ti: 
ffff8807da868000 task.ti: ffff8807da868000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262363] RIP: 0010:[<ffffffffc034151c>] 
 [<ffffffffc034151c>] cifs_discard_remaining_data+0xc/0x70 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262371] RSP: 0018:ffff8807da86bdc0  
EFLAGS: 00010246
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262372] RAX: 00000000ffffffc3 RBX: 
ffff8807df0ae200 RCX: 0000000000000000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262373] RDX: ffffffffc0390b80 RSI: 
0000000000000000 RDI: ffff8807db71c000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262373] RBP: ffff8807da86bdd0 R08: 
000000000000004d R09: ffff8807da86bcfc
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262374] R10: 00000000000001fc R11: 
0000000000000000 R12: 000000000000004d
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262375] R13: ffff8800f2fa1c00 R14: 
ffff8800f2fa1c00 R15: ffff8807df2ea680
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262376] FS:  0000000000000000(0000) 
GS:ffff8807e5680000(0000) knlGS:0000000000000000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262377] CS:  0010 DS: 0000 ES: 0000 
CR0: 0000000080050033
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262377] CR2: 0000000000000000 CR3: 
00000007de707000 CR4: 00000000003406e0
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262379] DR0: 0000000000000000 DR1: 
0000000000000000 DR2: 0000000000000000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262380] DR3: 0000000000000000 DR6: 
00000000fffe0ff0 DR7: 0000000000000400
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262380] Stack:
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262381]  ffff8807df0ae200 
000000000000004d ffff8807da86bdf8 ffffffffc034159e
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262382]  ffff8807db71c000 
000000000000004d ffff8807df0ae200 ffff8807da86be40
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262383]  ffffffffc0341694 
0000000000000000 0000000000000000 ffff8807e1440f00
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262385] Call Trace:
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262391]  [<ffffffffc034159e>] 
cifs_readv_discard+0x1e/0x40 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262396]  [<ffffffffc0341694>] 
cifs_readv_receive+0xd4/0x590 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262402]  [<ffffffffc034f4f8>] 
cifs_demultiplex_thread+0x778/0xac0 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262408]  [<ffffffffc034ed80>] ? 
cifs_handle_standard+0x130/0x130 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262410]  [<ffffffff810a0c85>] 
kthread+0xe5/0x100
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262412]  [<ffffffff810a0ba0>] ? 
kthread_create_on_node+0x1e0/0x1e0
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262414]  [<ffffffff8184224f>] 
ret_from_fork+0x3f/0x70
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262415]  [<ffffffff810a0ba0>] ? 
kthread_create_on_node+0x1e0/0x1e0
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262416] Code: 84 69 fe ff ff 44 89 f0 
eb 92 41 81 4d 00 00 00 02 00 e9 31 ff ff ff e8 03 fc d3 c0 0f 1f 00 0f 1f 44 
00 00 55 48 89 e5 41 54 53 <8b> 06 bb 04 00 00 00 2b 9f 60 03 00 00 49 89 fc 0f 
c8 25 ff ff
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262429] RIP  [<ffffffffc034151c>] 
cifs_discard_remaining_data+0xc/0x70 [cifs]
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262435]  RSP <ffff8807da86bdc0>
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262435] CR2: 0000000000000000
Jul 13 14:38:05 ubuntu-vm kernel: [  770.262437] ---[ end trace 
5ac5926a1424b7e6 ]---

I think this issue is caused by commit
http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/commit/?h=master-
next&id=bdf2bdef7c7b61663266d942fabd528a4c7eddda which is a copy of
upstream commit. In upstream the issue has been fixed by commit
https://github.com/torvalds/linux/commit/350be257ea83029daee974c72b1fe2e6f1f8e615.
I did cherry-picked it into your Xenial branch and run small tests - it
went well. Can you please apply the latter commit as well to the
proposed kernel?

Also, you might want to consider merging one more commit for encryption
series to your branches (small bugfix) -
https://github.com/torvalds/linux/commit/517a6e43c4872c89794af5b377fa085e47345952.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1670508

Title:
  CIFS: Enable encryption for SMB3

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Xenial:
  Fix Committed
Status in linux source package in Yakkety:
  Fix Released
Status in linux source package in Zesty:
  Fix Released

Bug description:
  There has been work upstream to enable encryption support for SMB3
  connections. This is a particularly valuable (and commonly requested)
  feature with the Azure Files service as encryption is required to
  connect to an Azure Files storage share from on-prem or from a
  different Azure region.

  The relevant commits are as follows:

  CIFS: Fix possible use after free in demultiplex thread
  Commit 61cfac6f267dabcf2740a7ec8a0295833b28b5f5

  CIFS: Allow to switch on encryption with seal mount option
  Commit ae6f8dd4d0c87bfb72da9d9b56342adf53e69c31

  CIFS: Add capability to decrypt big read responses
  Commit c42a6abe3012832a68a371dabe17c2ced97e62ad

  CIFS: Decrypt and process small encrypted packets
  Commit 4326ed2f6a16ae9d33e4209b540dc9a371aba840

  CIFS: Add copy into pages callback for a read operation
  Commit d70b9104b1ca586f73aaf59426756cec3325a40e

  CIFS: Add mid handle callback
  Commit 9b7c18a2d4b798963ea80f6769701dcc4c24b55e

  CIFS: Add transform header handling callbacks
  Commit 9bb17e0916a03ab901fb684e874d77a1e96b3d1e

  CIFS: Encrypt SMB3 requests before sending
  Commit 026e93dc0a3eefb0be060bcb9ecd8d7a7fd5c398

  CIFS: Enable encryption during session setup phase
  Commit cabfb3680f78981d26c078a26e5c748531257ebb

  CIFS: Add capability to transform requests before sending
  Commit 7fb8986e7449d0a5cebd84d059927afa423fbf85

  CIFS: Separate RFC1001 length processing for SMB2 read
  Commit b8f57ee8aad414a3122bff72d7968a94baacb9b6

  CIFS: Separate SMB2 sync header processing
  Commit cb200bd6264a80c04e09e8635fa4f3901cabdaef

  CIFS: Send RFC1001 length in a separate iov
  Commit 738f9de5cdb9175c19d24cfdf90b4543fc3b47bf

  CIFS: Make send_cancel take rqst as argument
  Commit fb2036d817584df42504910fe104f68517e8990e

  CIFS: Make SendReceive2() takes resp iov
  Commit da502f7df03d2d0b416775f92ae022f3f82bedd5

  CIFS: Separate SMB2 header structure
  Commit 31473fc4f9653b73750d3792ffce6a6e1bdf0da7

  cifs: Add soft dependencies
  Commit b9be76d585d48cb25af8db0d35e1ef9030fbe13a

  cifs: Only select the required crypto modules
  Commit 3692304bba6164be3810afd41b84ecb0e1e41db1

  cifs: Simplify SMB2 and SMB311 dependencies
  Commit c1ecea87471bbb614f8121e00e5787f363140365

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670508/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to