linux-odroid-c2 3.16.57-1 kernel oops mounting cifs share

Problems with packages? Post here, using [tags] of the package name.

linux-odroid-c2 3.16.57-1 kernel oops mounting cifs share

Postby aroberts » Sat Sep 01, 2018 6:59 am

I just updated an ODROID-C2 and it installed a new kernel 3.16.57-1.
After a reboot the mounting of CIFS shares now fails, and the journal is showing a NULL ptr dereference in the kernel

journalctl log attached.

The shares are mounted using the following fstab entry:
$this->bbcode_second_pass_code('', '
//192.168.1.30/share /mnt/share cifs defaults,noauto,noserverino,xsystemd.automount,rw,uid=alarm,gid=alarm,credentials=/etc/cifs-credentials,vers=3.0 0 0
')

So this is a CIFS v3 mount. It was working fine on previous 3.14 kernel, and across a host of RPI's.
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Sat Sep 01, 2018 7:03 am

Hmm, the log is missing, can't upload files with a .txt extension (why?).
Here it is zipped.
Attachments
tmp.zip
linux-odroid-c2 3.16.57-1 kernel journal log
(1.5 KiB) Downloaded 296 times
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Mon Sep 03, 2018 2:47 am

Updated kernel today: 3.16.57-2-ARCH
Still the same issue:

$this->bbcode_second_pass_code('', 'Sep 03 03:41:47 alarm systemd[1]: mnt-share.automount: Got automount request for
/mnt/share, triggered by 322 (ls)
Sep 03 03:41:47 alarm systemd[1]: Reached target Network is Online.
Sep 03 03:41:47 alarm systemd[1]: Mounting /mnt/share...
Sep 03 03:41:47 alarm kernel: FS-Cache: Loaded
Sep 03 03:41:47 alarm kernel: FS-Cache: Netfs 'cifs' registered for caching
Sep 03 03:41:47 alarm kernel: Key type cifs.spnego registered
Sep 03 03:41:47 alarm kernel: Key type cifs.idmap registered
Sep 03 03:41:47 alarm kernel: Unable to handle kernel NULL pointer dereference a
t virtual address 00000090
Sep 03 03:41:47 alarm kernel: pgd = ffffffc05983a000
Sep 03 03:41:47 alarm kernel: [00000090] *pgd=0000000000000000
Sep 03 03:41:47 alarm kernel: Internal error: Oops: 96000005 [#1] PREEMPT SMP
Sep 03 03:41:47 alarm kernel: Modules linked in: md4 cifs fscache spidev spi_gpi
o w1_gpio spi_bitbang wire gxbb_wdt meson_gpiomem sch_fq_codel ip_tables ipv6 au
tofs4
Sep 03 03:41:47 alarm kernel: CPU: 3 PID: 324 Comm: mount.cifs Not tainted 3.16.
57-2-ARCH #1
Sep 03 03:41:47 alarm kernel: task: ffffffc059b6cb00 ti: ffffffc05ab14000 task.t
i: ffffffc05ab14000
Sep 03 03:41:47 alarm kernel: pc : crypto_shash_setkey+0x28/0xe8
Sep 03 03:41:47 alarm kernel: lr : $x+0x60/0x188 [cifs]
Sep 03 03:41:47 alarm kernel: sp : ffffffc05ab178e0 pstate : 40000145
Sep 03 03:41:47 alarm kernel: x29: ffffffc05ab178e0 x28: 0000000000000000
Sep 03 03:41:47 alarm kernel: x27: ffffffc05ab17b04 x26: ffffffc05ab17b10
Sep 03 03:41:47 alarm kernel: x25: ffffffc059ef6034 x24: 0000000000000002
Sep 03 03:41:47 alarm kernel: x23: 0000000000000010 x22: ffffffc059c96000
Sep 03 03:41:47 alarm kernel: x21: ffffffc05923a918 x20: ffffffc05ab17a50
Sep 03 03:41:47 alarm kernel: x19: 0000000000000000 x18: 0000000000000007
Sep 03 03:41:47 alarm kernel: x17: 000000000000000e x16: 0000000000000001
Sep 03 03:41:47 alarm kernel: x15: 0000000000000007 x14: 000000000000000e
Sep 03 03:41:47 alarm kernel: x13: 0000000000000013 x12: 0000000000000020
Sep 03 03:41:47 alarm kernel: x11: 0101010101010101 x10: ffffffff7f7f7f7f
Sep 03 03:41:47 alarm kernel: x9 : 0000000000000000 x8 : ffffffc059ef6100
Sep 03 03:41:47 alarm kernel: x7 : 0000000000000000 x6 : 000000000000003f
Sep 03 03:41:47 alarm kernel: x5 : ffffffc0589b6880 x4 : ffffffc05ab17880
Sep 03 03:41:47 alarm kernel: x3 : ffffffc05ab178f0 x2 : 0000000000000010
Sep 03 03:41:47 alarm kernel: x1 : ffffffc05923a918 x0 : ffffffbffc111500
Sep 03 03:41:47 alarm kernel:
Sep 03 03:41:47 alarm kernel: Process mount.cifs (pid: 324, stack limit = 0xffff
ffc05ab14058)
Sep 03 03:41:47 alarm kernel: Call trace:
Sep 03 03:41:47 alarm kernel: crypto_shash_setkey+0x28/0xe8
Sep 03 03:41:47 alarm kernel: $x+0x60/0x188 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0x58/0x98 [cifs]
Sep 03 03:41:47 alarm kernel: smb2_setup_request+0xc0/0x118 [cifs]
Sep 03 03:41:47 alarm kernel: SendReceive2+0xb0/0x348 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0xf8/0x240 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0xb0/0x178 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0x1c0/0x270 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0xe0/0x228 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0x350/0x908 [cifs]
Sep 03 03:41:47 alarm kernel: $x+0xf4/0x3f0 [cifs]
Sep 03 03:41:47 alarm kernel: mount_fs+0x5c/0x1f0
Sep 03 03:41:47 alarm kernel: vfs_kern_mount.part.9+0x54/0x150
Sep 03 03:41:47 alarm kernel: do_mount+0x3c4/0xbf8
Sep 03 03:41:47 alarm kernel: SyS_mount+0x104/0x128
Sep 03 03:41:47 alarm kernel: Code: aa0103f5 aa1e03e0 2a0203f7 d503201f (f9404a7
6)
Sep 03 03:41:47 alarm kernel: ---[ end trace ffcb10c1a6fdf1c5 ]---
Sep 03 03:41:47 alarm systemd[1]: mnt-share.mount: Mount process exited, code=ex
ited status=255
Sep 03 03:41:47 alarm systemd[1]: mnt-share.mount: Failed with result 'exit-code
'.
Sep 03 03:41:47 alarm systemd[1]: Failed to mount /mnt/share.
')
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby TheSaint » Tue Sep 04, 2018 10:57 am

It seems something about encryption....
Do you have the shares encrypted ?
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Wed Sep 05, 2018 5:14 am

The shares are not encrypted, but the cifs protocol will probably be internally using encryption. The V3 protool is designed to be secure unlike the earlier versions.
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Sun Sep 16, 2018 5:56 am

FWIW I get pretty much the same kernel oops running Debian 8.11 which has the same kernel (3.16.57-2) on an Intel i586 box.

This looks like its a bug in the SMB3 handling in that 3.16.57-2 kernel that isn't aarch64/odroid-c2 speciifc. It did work in the previous odroid-c2 3.14 kernel though.

The Server which the boxes are trying to mount off is a Centos (7.5.1804) x66_64 (3.10.0-862.11.6.el7.x86_64) box with the following extra options in its smb.conf
$this->bbcode_second_pass_code('', '
hosts deny = ALL
hosts allow = 127. 192.168.1.
nt pipe support = no
client max protocol = SMB3
client min protocol = SMB2_10
server min protocol = SMB2_10
')

If I mount using vers=2.1 in the /etc/fstab file (rather than vers=3.0) then it works on both debian/i586 and aarch64/ordoid-c2.
Other kernel versions on Raspberry Pi and Debian 9 i686 are fine with vers=3.0. The whole point of using vers=3.0 is that there was a CERT advisory about eariler versions being insecure, thus is this a security issue.

It would be nice if somebody with some clout could report it upstream though.

$this->bbcode_second_pass_code('', '
uname -a
Linux pentium 3.16.0-6-586 #1 Debian 3.16.57-2 (2018-07-14) i586 GNU/Linux
')

$this->bbcode_second_pass_code('', '
journalctl -b0
Sep 16 06:06:38 pentium kernel: BUG: unable to handle kernel NULL pointer dereference at 00000034
Sep 16 06:06:38 pentium kernel: IP: [<c11e87de>] crypto_shash_setkey+0xe/0xb0
Sep 16 06:06:38 pentium kernel: *pde = 00000000
Sep 16 06:06:38 pentium kernel: Oops: 0000 [#1]
Sep 16 06:06:38 pentium kernel: Modules linked in: arc4 ecb md4 hmac nls_utf8 isofs udf crc_itu_t cifs dns_resolver nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc ppdev snd_emu10k1 snd_util_mem snd_rawmidi snd_hwdep snd_seq_device snd_ac97_codec evdev snd_pcm snd_timer serio_raw snd pcspkr soundcore emu10k1_gp ac97_bus gameport parport_pc parport processor button fuse autofs4 ext4 crc16 mbcache jbd2 hid_generic usbhid sg hid sd_mod sr_mod crc_t10dif crct10dif_generic cdrom crct10dif_common ata_generic ata_piix uhci_hcd libata ehci_hcd usbcore i2c_piix4 scsi_mod 3c59x mii i2c_core usb_common thermal fan thermal_sys floppy
Sep 16 06:06:38 pentium kernel: CPU: 0 PID: 3932 Comm: mount.cifs Not tainted 3.16.0-6-586 #1 Debian 3.16.57-2
Sep 16 06:06:38 pentium kernel: Hardware name: /i430TX-SMC669, BIOS 4.51 PG 07/20/98
Sep 16 06:06:38 pentium kernel: task: cd184500 ti: cfbc0000 task.ti: cfbc0000
Sep 16 06:06:38 pentium kernel: EIP: 0060:[<c11e87de>] EFLAGS: 00010296 CPU: 0
Sep 16 06:06:38 pentium kernel: EIP is at crypto_shash_setkey+0xe/0xb0
Sep 16 06:06:38 pentium kernel: EAX: 00000000 EBX: cfab81e0 ECX: 00000010 EDX: cd8daac4
Sep 16 06:06:38 pentium kernel: ESI: cfbc1d18 EDI: cdba4000 EBP: cfbc1c30 ESP: cfbc1c18
Sep 16 06:06:38 pentium kernel: DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
Sep 16 06:06:38 pentium kernel: CR0: 8005003b CR2: 00000034 CR3: 0fa79000 CR4: 00000010
Sep 16 06:06:38 pentium kernel: Stack:
Sep 16 06:06:38 pentium kernel: 00000246 c10efd02 00011200 cfab81e0 cfbc1d18 cdba4000 cfbc1c7c d0f16e39
Sep 16 06:06:38 pentium kernel: c10efd02 00000082 cfbc1cd0 cfab81e0 cdba4008 f85388a6 00000002 c15e3ac0
Sep 16 06:06:38 pentium kernel: 00000246 00000000 00000000 00000000 00000000 9b528262 cfa234c0 cd8daa00
Sep 16 06:06:38 pentium kernel: Call Trace:
Sep 16 06:06:38 pentium kernel: [<c10efd02>] ? mempool_alloc+0x42/0x120
Sep 16 06:06:38 pentium kernel: [<d0f16e39>] ? smb3_calc_signature+0xb9/0x2a0 [cifs]
Sep 16 06:06:38 pentium kernel: [<c10efd02>] ? mempool_alloc+0x42/0x120
Sep 16 06:06:38 pentium kernel: [<d0f164cf>] ? smb2_sign_rqst+0x2f/0x60 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0f172dc>] ? smb2_setup_request+0x8c/0x130 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0f06ccc>] ? SendReceive2+0xac/0x3f0 [cifs]
Sep 16 06:06:38 pentium kernel: [<c1060007>] ? set_security_override_from_ctx+0x7/0x40
Sep 16 06:06:38 pentium kernel: [<d0f1ab73>] ? SMB2_ioctl+0x133/0x2e0 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0f1ae43>] ? smb3_validate_negotiate+0x123/0x310 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0f18ae1>] ? SMB2_tcon+0x261/0x480 [cifs]
Sep 16 06:06:38 pentium kernel: [<c11049da>] ? kstrdup+0x3a/0x50
Sep 16 06:06:38 pentium kernel: [<d0f18880>] ? smb2_writev_callback+0xe0/0xe0 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0eeda92>] ? cifs_get_tcon+0x192/0x400 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0ef2c4d>] ? cifs_mount+0x49d/0xc40 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0edf7b9>] ? cifs_do_mount+0xc9/0x5b0 [cifs]
Sep 16 06:06:38 pentium kernel: [<d0edf6f0>] ? cifs_drop_inode+0x40/0x40 [cifs]
Sep 16 06:06:38 pentium kernel: [<c113a3d6>] ? mount_fs+0x36/0x190
Sep 16 06:06:38 pentium kernel: [<c11049da>] ? kstrdup+0x3a/0x50
Sep 16 06:06:38 pentium kernel: [<c1151f28>] ? vfs_kern_mount+0x48/0xf0
Sep 16 06:06:38 pentium kernel: [<c1154988>] ? do_mount+0x1e8/0xa60
Sep 16 06:06:38 pentium kernel: [<c1104c99>] ? strndup_user+0x39/0xc0
Sep 16 06:06:38 pentium kernel: [<c11545df>] ? copy_mount_options+0x2f/0x1c0
Sep 16 06:06:38 pentium kernel: [<c11554cc>] ? SyS_mount+0x9c/0xf0
Sep 16 06:06:38 pentium kernel: [<c145308d>] ? syscall_call+0x10/0x10
Sep 16 06:06:38 pentium kernel: Code: 26 00 8b 55 f0 83 c4 10 5b 5e 89 d0 5f 5d c3 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 0c 3e 8d 74 26 00 <8b> 78 34 89 4d f0 89 c3 89 d6 8b 4f 1c 85 ca 74 59 89 c8 ba d0
Sep 16 06:06:38 pentium kernel: EIP: [<c11e87de>] crypto_shash_setkey+0xe/0xb0 SS:ESP 0068:cfbc1c18
Sep 16 06:06:38 pentium kernel: CR2: 0000000000000034
Sep 16 06:06:38 pentium kernel: ---[ end trace fcb11b4e4c9db3f4 ]---
')
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Sun Sep 16, 2018 6:35 am

I've also filed a bug with Debian about this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908927
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am

Re: linux-odroid-c2 3.16.57-1 kernel oops mounting cifs shar

Postby aroberts » Tue Oct 02, 2018 3:43 am

This appears to be fixed in the latest kernel: 3.16.58-1-ARCH
aroberts
 
Posts: 49
Joined: Tue Mar 15, 2016 4:32 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 7 guests