syzbot


usb-testing boot error: general protection fault in __tty_alloc_driver

Status: upstream: reported on 2022/08/15 18:01
Reported-by: syzbot+2c35c4d66094ddfe198e@syzkaller.appspotmail.com
First crash: 46d, last: 26d
Patch testing requests:
Created Duration User Patch Repo Result
2022/08/15 19:20 9m linux@roeck-us.net patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v6.0-rc1 OK
2022/08/15 18:08 10m linux@roeck-us.net https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git fc4d146e8d7d25ef88d409bea1f2e9aff7f30635 OK

Sample crash report:
usbcore: registered new interface driver rtl8187
usbcore: registered new interface driver rtl8192cu
usbcore: registered new interface driver rtl8xxxu
usbcore: registered new interface driver RSI-USB WLAN
usbcore: registered new interface driver zd1211rw
usbcore: registered new interface driver zd1201
usbcore: registered new interface driver rndis_wlan
usbcore: registered new interface driver atusb
usbcore: registered new interface driver catc
usbcore: registered new interface driver kaweth
pegasus: Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
usbcore: registered new interface driver rtl8150
usbcore: registered new interface driver r8152
hso: drivers/net/usb/hso.c: Option Wireless
usbcore: registered new interface driver hso
usbcore: registered new interface driver lan78xx
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver cdc_eem
usbcore: registered new interface driver dm9601
usbcore: registered new interface driver sr9700
usbcore: registered new interface driver CoreChips
usbcore: registered new interface driver smsc75xx
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver gl620a
usbcore: registered new interface driver net1080
usbcore: registered new interface driver plusb
usbcore: registered new interface driver rndis_host
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver MOSCHIP usb-ethernet driver
usbcore: registered new interface driver int51x1
usbcore: registered new interface driver cdc_phonet
usbcore: registered new interface driver kalmia
usbcore: registered new interface driver ipheth
usbcore: registered new interface driver sierra_net
usbcore: registered new interface driver cx82310_eth
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver huawei_cdc_ncm
usbcore: registered new interface driver lg-vl600
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver cdc_mbim
usbcore: registered new interface driver ch9200
usbcore: registered new interface driver r8153_ecm
uhci_hcd: USB Universal Host Controller Interface driver
driver u132_hcd
Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
SPI driver max3421-hcd has no spi_device_id for maxim,max3421
general protection fault, probably for non-canonical address 0xffff000000000400: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xfff8200000002000-0xfff8200000002007]
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.0.0-rc1-syzkaller-00049-g4e55e22d3d9a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:freelist_dereference mm/slub.c:347 [inline]
RIP: 0010:get_freepointer mm/slub.c:354 [inline]
RIP: 0010:get_freepointer_safe mm/slub.c:368 [inline]
RIP: 0010:slab_alloc_node mm/slub.c:3211 [inline]
RIP: 0010:slab_alloc mm/slub.c:3251 [inline]
RIP: 0010:__kmalloc+0x10e/0x320 mm/slub.c:4420
Code: 8b 51 08 48 8b 01 48 83 79 10 00 48 89 44 24 08 0f 84 dc 01 00 00 48 85 c0 0f 84 d3 01 00 00 48 8b 7d 00 8b 4d 28 40 f6 c7 0f <48> 8b 1c 08 0f 85 df 01 00 00 48 8d 4a 08 65 48 0f c7 0f 0f 94 c0
RSP: 0000:ffffc9000001fd60 EFLAGS: 00010246
RAX: ffff000000000000 RBX: 0000000000000100 RCX: 0000000000000400
RDX: 0000000000000a79 RSI: 0000000000000dc0 RDI: 000000000003b420
RBP: ffff888100042000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000dc0
R13: 0000000000000800 R14: 0000000000000dc0 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000007825000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kmalloc_array include/linux/slab.h:640 [inline]
 kcalloc include/linux/slab.h:671 [inline]
 __tty_alloc_driver drivers/tty/tty_io.c:3340 [inline]
 __tty_alloc_driver+0x2e8/0x510 drivers/tty/tty_io.c:3317
 acm_init+0x19/0x318 drivers/usb/class/cdc-acm.c:2036
 do_one_initcall+0xfe/0x650 init/main.c:1296
 do_initcall_level init/main.c:1369 [inline]
 do_initcalls init/main.c:1385 [inline]
 do_basic_setup init/main.c:1404 [inline]
 kernel_init_freeable+0x6ac/0x735 init/main.c:1611
 kernel_init+0x1a/0x1d0 init/main.c:1500
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:freelist_dereference mm/slub.c:347 [inline]
RIP: 0010:get_freepointer mm/slub.c:354 [inline]
RIP: 0010:get_freepointer_safe mm/slub.c:368 [inline]
RIP: 0010:slab_alloc_node mm/slub.c:3211 [inline]
RIP: 0010:slab_alloc mm/slub.c:3251 [inline]
RIP: 0010:__kmalloc+0x10e/0x320 mm/slub.c:4420
Code: 8b 51 08 48 8b 01 48 83 79 10 00 48 89 44 24 08 0f 84 dc 01 00 00 48 85 c0 0f 84 d3 01 00 00 48 8b 7d 00 8b 4d 28 40 f6 c7 0f <48> 8b 1c 08 0f 85 df 01 00 00 48 8d 4a 08 65 48 0f c7 0f 0f 94 c0
RSP: 0000:ffffc9000001fd60 EFLAGS: 00010246
RAX: ffff000000000000 RBX: 0000000000000100 RCX: 0000000000000400
RDX: 0000000000000a79 RSI: 0000000000000dc0 RDI: 000000000003b420
RBP: ffff888100042000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000dc0
R13: 0000000000000800 R14: 0000000000000dc0 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000007825000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8b 51 08             	mov    0x8(%rcx),%edx
   3:	48 8b 01             	mov    (%rcx),%rax
   6:	48 83 79 10 00       	cmpq   $0x0,0x10(%rcx)
   b:	48 89 44 24 08       	mov    %rax,0x8(%rsp)
  10:	0f 84 dc 01 00 00    	je     0x1f2
  16:	48 85 c0             	test   %rax,%rax
  19:	0f 84 d3 01 00 00    	je     0x1f2
  1f:	48 8b 7d 00          	mov    0x0(%rbp),%rdi
  23:	8b 4d 28             	mov    0x28(%rbp),%ecx
  26:	40 f6 c7 0f          	test   $0xf,%dil
* 2a:	48 8b 1c 08          	mov    (%rax,%rcx,1),%rbx <-- trapping instruction
  2e:	0f 85 df 01 00 00    	jne    0x213
  34:	48 8d 4a 08          	lea    0x8(%rdx),%rcx
  38:	65 48 0f c7 0f       	cmpxchg16b %gs:(%rdi)
  3d:	0f 94 c0             	sete   %al

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-usb 2022/09/03 14:43 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4e55e22d3d9a 28811d0a .config log report usb-testing boot error: general protection fault in __tty_alloc_driver
ci2-upstream-usb 2022/08/15 10:06 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 568035b01cfb 8dfcaa3d .config log report usb-testing boot error: general protection fault in __tty_alloc_driver
* Struck through repros no longer work on HEAD.