syzbot


general protection fault in ingress_destroy

Status: fixed on 2023/10/12 12:48
Subsystems: net
[Documentation on labels]
Fix commit: 079082c60aff tcx: Fix splat during dev unregister
First crash: 281d, last: 277d

Sample crash report:
bond1 (unregistering): (slave bridge5): Releasing backup interface
bridge5 (unregistering): left promiscuous mode
bridge5 (unregistering): left allmulticast mode
bond1 (unregistering): Released all slaves
general protection fault, probably for non-canonical address 0xdffffc00000000c5: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000628-0x000000000000062f]
CPU: 0 PID: 31 Comm: kworker/u4:2 Not tainted 6.5.0-rc2-syzkaller-00559-gf5f80e32de12 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
Workqueue: netns cleanup_net
RIP: 0010:tcx_miniq_set_active include/net/tcx.h:136 [inline]
RIP: 0010:ingress_destroy+0x21c/0x520 net/sched/sch_ingress.c:124
Code: 03 80 3c 02 00 0f 85 cf 02 00 00 48 8b 9d 00 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 28 06 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e af 02 00 00 c6 83 28 06 00 00 00 e8
RSP: 0018:ffffc90000a7f918 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000c5 RSI: ffffffff8851818b RDI: 0000000000000628
RBP: ffff88804a844008 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: ffff8880b9829358 R12: ffff88804b85e000
R13: ffff88804a844208 R14: ffff88804b85e448 R15: 0000000000000002
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6727f7d866 CR3: 000000000c776000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __qdisc_destroy+0xc4/0x450 net/sched/sch_generic.c:1063
 qdisc_put+0xd1/0xf0 net/sched/sch_generic.c:1090
 shutdown_scheduler_queue+0xa5/0x160 net/sched/sch_generic.c:1143
 dev_shutdown+0x17e/0x430 net/sched/sch_generic.c:1477
 unregister_netdevice_many_notify+0x5bd/0x1a20 net/core/dev.c:10898
 unregister_netdevice_many net/core/dev.c:10964 [inline]
 default_device_exit_batch+0x584/0x740 net/core/dev.c:11417
 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175
 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614
 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2597
 worker_thread+0x687/0x1110 kernel/workqueue.c:2748
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:296
RIP: 0000:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:tcx_miniq_set_active include/net/tcx.h:136 [inline]
RIP: 0010:ingress_destroy+0x21c/0x520 net/sched/sch_ingress.c:124
Code: 03 80 3c 02 00 0f 85 cf 02 00 00 48 8b 9d 00 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 28 06 00 00 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e af 02 00 00 c6 83 28 06 00 00 00 e8
RSP: 0018:ffffc90000a7f918 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000000c5 RSI: ffffffff8851818b RDI: 0000000000000628
RBP: ffff88804a844008 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: ffff8880b9829358 R12: ffff88804b85e000
R13: ffff88804a844208 R14: ffff88804b85e448 R15: 0000000000000002
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6727f7d866 CR3: 0000000028482000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	03 80 3c 02 00 0f    	add    0xf00023c(%rax),%eax
   6:	85 cf                	test   %ecx,%edi
   8:	02 00                	add    (%rax),%al
   a:	00 48 8b             	add    %cl,-0x75(%rax)
   d:	9d                   	popf
   e:	00 02                	add    %al,(%rdx)
  10:	00 00                	add    %al,(%rax)
  12:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  19:	fc ff df
  1c:	48 8d bb 28 06 00 00 	lea    0x628(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	74 06                	je     0x38
  32:	0f 8e af 02 00 00    	jle    0x2e7
  38:	c6 83 28 06 00 00 00 	movb   $0x0,0x628(%rbx)
  3f:	e8                   	.byte 0xe8

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/24 10:58 net-next f5f80e32de12 06460670 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in ingress_destroy
2023/07/20 10:28 net-next 03b123debcbc 7b630fdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in ingress_destroy
2023/07/20 07:58 net-next 03b123debcbc 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in ingress_destroy
2023/07/22 03:26 net-next 6bfef2ec0172 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in ingress_destroy
2023/07/21 22:19 net-next 2da6a8041699 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in ingress_destroy
2023/07/21 08:47 net-next b44693495af8 28847498 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in ingress_destroy
2023/07/20 17:45 net-next 03b123debcbc 7b630fdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in ingress_destroy
2023/07/20 17:08 net-next 03b123debcbc 7b630fdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in ingress_destroy
2023/07/20 08:09 net-next 03b123debcbc 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: use-after-free Read in ingress_destroy
2023/07/20 12:17 linux-next c58c49dd8932 7b630fdb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in ingress_destroy
* Struck through repros no longer work on HEAD.