syzbot


general protection fault in skb_queue_tail (3)

Status: upstream: reported C repro on 2022/10/12 14:03
Reported-by: syzbot+160a7250e255d25725eb@syzkaller.appspotmail.com
First crash: 61d, last: 6d17h

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: INFO: trying to register non-static key in skb_queue_tail (log)
Repro: C syz .config
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in skb_queue_tail (2) 2 495d 504d 0/24 auto-closed as invalid on 2021/10/23 19:22
upstream general protection fault in skb_queue_tail C done 35 1318d 1320d 13/24 fixed on 2019/05/27 12:48
linux-4.19 KASAN: use-after-free Write in skb_queue_tail 1 544d 544d 0/1 auto-closed as invalid on 2021/10/05 02:17
Patch testing requests:
Created Duration User Patch Repo Result
2022/10/23 01:34 17m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git aaa11ce2ffc8 OK log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.1.0-rc2-syzkaller-00078-g98555239e4c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
Workqueue: usb_hub_wq hub_event
RIP: 0010:__skb_insert include/linux/skbuff.h:2167 [inline]
RIP: 0010:__skb_queue_before include/linux/skbuff.h:2273 [inline]
RIP: 0010:__skb_queue_tail include/linux/skbuff.h:2306 [inline]
RIP: 0010:skb_queue_tail+0xb8/0x120 net/core/skbuff.c:3504
Code: dc a9 f9 4d 89 2f 49 bf 00 00 00 00 00 fc ff df 42 80 7c 3d 00 00 74 08 4c 89 f7 e8 62 dc a9 f9 49 89 1e 4c 89 e8 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 ef e8 49 dc a9 f9 49 89 5d 00 49 83 c4
RSP: 0018:ffffc900000077c8 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff888025e49000 RCX: dffffc0000000000
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: ffffc900000076a0
RBP: 1ffff11004976713 R08: dffffc0000000000 R09: fffff52000000ed4
R10: fffff52000000ed5 R11: 1ffff92000000ed4 R12: ffff888024bb3890
R13: 0000000000000000 R14: ffff888024bb3898 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb6958291c8 CR3: 000000007c6e1000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 hif_usb_regout_cb+0x12d/0x160 drivers/net/wireless/ath/ath9k/hif_usb.c:90
 __usb_hcd_giveback_urb+0x369/0x530 drivers/usb/core/hcd.c:1671
 dummy_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy_hcd.c:1988
 call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474
 expire_timers kernel/time/timer.c:1519 [inline]
 __run_timers+0x76a/0x980 kernel/time/timer.c:1790
 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
 __do_softirq+0x277/0x75b kernel/softirq.c:571
 __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1107
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:sysfs_unmerge_group+0x0/0x130 fs/sysfs/group.c:361
Code: fc ff ff 48 8d 7c 24 70 e8 ed a8 c6 ff 48 ba 00 00 00 00 00 fc ff df e9 5f fc ff ff e8 59 e3 2f 08 66 0f 1f 84 00 00 00 00 00 <41> 57 41 56 41 55 41 54 53 49 89 f7 48 89 fb 49 bd 00 00 00 00 00
RSP: 0018:ffffc900000c7380 EFLAGS: 00000293
RAX: ffffffff84f2572f RBX: 0000000000000006 RCX: ffff888012363a80
RDX: 0000000000000000 RSI: ffffffff8b245920 RDI: ffff888017f85010
RBP: ffffc900000c74a0 R08: ffffffff84f25726 R09: fffff52000018e65
R10: fffff52000018e65 R11: 1ffff92000018e64 R12: ffff888017f85010
R13: dffffc0000000000 R14: ffff888017f85010 R15: ffff888012363aac
 dpm_sysfs_remove+0x4e/0xb0 drivers/base/power/sysfs.c:833
 device_del+0x2ed/0xbe0 drivers/base/core.c:3681
 device_unregister+0x17/0xb0 drivers/base/core.c:3736
 usb_remove_ep_devs+0x4c/0x80 drivers/usb/core/endpoint.c:188
 remove_intf_ep_devs drivers/usb/core/message.c:1267 [inline]
 usb_disable_device+0x35a/0x820 drivers/usb/core/message.c:1418
 usb_disconnect+0x346/0x890 drivers/usb/core/hub.c:2235
 hub_port_connect+0x296/0x2910 drivers/usb/core/hub.c:5197
 hub_port_connect_change+0x619/0xbe0 drivers/usb/core/hub.c:5497
 port_event+0xec6/0x13b0 drivers/usb/core/hub.c:5653
 hub_event+0x5c1/0xd80 drivers/usb/core/hub.c:5735
 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__skb_insert include/linux/skbuff.h:2167 [inline]
RIP: 0010:__skb_queue_before include/linux/skbuff.h:2273 [inline]
RIP: 0010:__skb_queue_tail include/linux/skbuff.h:2306 [inline]
RIP: 0010:skb_queue_tail+0xb8/0x120 net/core/skbuff.c:3504
Code: dc a9 f9 4d 89 2f 49 bf 00 00 00 00 00 fc ff df 42 80 7c 3d 00 00 74 08 4c 89 f7 e8 62 dc a9 f9 49 89 1e 4c 89 e8 48 c1 e8 03 <42> 80 3c 38 00 74 08 4c 89 ef e8 49 dc a9 f9 49 89 5d 00 49 83 c4
RSP: 0018:ffffc900000077c8 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff888025e49000 RCX: dffffc0000000000
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: ffffc900000076a0
RBP: 1ffff11004976713 R08: dffffc0000000000 R09: fffff52000000ed4
R10: fffff52000000ed5 R11: 1ffff92000000ed4 R12: ffff888024bb3890
R13: 0000000000000000 R14: ffff888024bb3898 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb6958291c8 CR3: 000000007c6e1000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	dc a9 f9 4d 89 2f    	fsubrl 0x2f894df9(%rcx)
   6:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
   d:	fc ff df
  10:	42 80 7c 3d 00 00    	cmpb   $0x0,0x0(%rbp,%r15,1)
  16:	74 08                	je     0x20
  18:	4c 89 f7             	mov    %r14,%rdi
  1b:	e8 62 dc a9 f9       	callq  0xf9a9dc82
  20:	49 89 1e             	mov    %rbx,(%r14)
  23:	4c 89 e8             	mov    %r13,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 49 dc a9 f9       	callq  0xf9a9dc82
  39:	49 89 5d 00          	mov    %rbx,0x0(%r13)
  3d:	49                   	rex.WB
  3e:	83                   	.byte 0x83
  3f:	c4                   	.byte 0xc4

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/11/26 22:37 upstream 644e9524388a 86777b7f .config log report syz C
* Struck through repros no longer work on HEAD.
Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/10/27 16:22 upstream 98555239e4c3 86777b7f .config log report syz C general protection fault in skb_queue_tail
ci-upstream-linux-next-kasan-gce-root 2022/10/03 00:11 linux-next aaa11ce2ffc8 feb56351 .config log report syz C general protection fault in skb_queue_tail
* Struck through repros no longer work on HEAD.