azure 4.15 kernel: reading sysfs file causing oops
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Incomplete
|
Medium
|
Unassigned | ||
Bionic |
In Progress
|
Medium
|
Marcelo Cerri | ||
linux-azure (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Kernel: 4.15.0-1021-azure, in Xenial VM on Azure.
How to reproduce:
git clone git://kernel.
cd stress-ng
make
./stress-ng --sysfs 0 -t 120
One gets the following:
[ 22.451885] BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
[ 22.455286] IP: read_avail_
[ 22.455286] PGD 800000042d59e067 P4D 800000042d59e067 PUD 42eb8c067 PMD 0
[ 22.455286] Oops: 0000 [#1] SMP PTI
[ 22.455286] Modules linked in: nf_conntrack_ipv4 nf_defrag_ipv4 xt_owner xt_conntrack nf_conntrack iptable_security ip_tables x_tables serio_raw joydev hv_balloon ib_iser iscsi_tcp libiscsi_tcp libiscsi scsi_transport_
[ 22.455286] CPU: 1 PID: 1670 Comm: cat Not tainted 4.15.0-1021-azure #21~16.04.1-Ubuntu
[ 22.455286] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090007 06/02/2017
[ 22.455286] RIP: 0010:read_
[ 22.455286] RSP: 0018:ffffafa4c4
[ 22.455286] RAX: 0000000000000000 RBX: ffff9db36c93e880 RCX: ffff9db36f136908
[ 22.860062] RDX: 0000000000000000 RSI: ffff9db364548000 RDI: ffff9db364548000
[ 22.888042] RBP: ffffafa4c4eafdb0 R08: ffff9db364548000 R09: ffff9db36c049840
[ 22.920041] R10: ffff9db364548000 R11: 0000000000000000 R12: ffffffff92ae9440
[ 22.948058] R13: ffff9db36c22d200 R14: 0000000000000001 R15: ffff9db36c93e880
[ 22.972043] FS: 00007f67eeec670
[ 23.004046] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 23.024016] CR2: 0000000000000004 CR3: 000000042c37a003 CR4: 00000000001606e0
[ 23.048014] Call Trace:
[ 23.060019] vmbus_chan_
[ 23.076018] sysfs_kf_
[ 23.088030] kernfs_
[ 23.100020] seq_read+0xb7/0x480
[ 23.112014] kernfs_
[ 23.128017] ? security_
[ 23.144013] __vfs_read+
[ 23.156019] vfs_read+0x93/0x130
[ 23.168013] SyS_read+0x55/0xc0
[ 23.180021] do_syscall_
[ 23.192014] entry_SYSCALL_
[ 23.212022] RIP: 0033:0x7f67ee9d8260
[ 23.224016] RSP: 002b:00007fffdc
[ 23.252022] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f67ee9d8260
[ 23.276019] RDX: 0000000000020000 RSI: 00007f67eed0c000 RDI: 0000000000000003
[ 23.300020] RBP: 0000000000020000 R08: ffffffffffffffff R09: 0000000000000000
[ 23.328025] R10: 000000000000037b R11: 0000000000000246 R12: 00007f67eed0c000
[ 23.352036] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000020000
[ 23.376678] Code: fb 3a 17 00 48 98 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 8b 87 38 01 00 00 49 89 f0 8b 97 48 01 00 00 4c 89 c7 48 89 e5 <8b> 48 04 8b 00 29 ca 89 c6 29 ce 01 c2 39 c1 0f 46 d6 48 c7 c6
[ 23.444022] RIP: read_avail_
[ 23.468021] CR2: 0000000000000004
[ 23.481135] ---[ end trace 348a4b7d5a6747d1 ]---
Cornered this down to just reading:
cat /sys/devices/
There are various /sysfs VMBUS files that trigger this, see a fix on comment #5 below that addresses all the ones I could find.
CVE References
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in linux (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → Marcelo Cerri (mhcerri) |
importance: | Undecided → Medium |
Changed in linux-azure (Ubuntu Bionic): | |
status: | New → Fix Committed |
tags: | added: cscc |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1789638
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.