syzbot


divide error in genelink_tx_fixup

Status: fixed on 2021/11/10 00:32
Reported-by: syzbot+38e5a2a089510cdadf76@syzkaller.appspotmail.com
Fix commit: 017718dfbb6f usbnet: fix error return code in usbnet_probe()
First crash: 466d, last: 460d

Cause bisection: failed (bisect log)
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 divide error in genelink_tx_fixup C 65 389d 472d 0/2 upstream: reported C repro on 2021/10/17 23:27
upstream divide error in genelink_tx_fixup C 572 455d 472d 0/24 auto-obsoleted due to no activity on 2022/09/05 07:59

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.75-syzkaller-01082-g234d53d2bb60 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:genelink_tx_fixup+0x415/0x5d0 drivers/net/usb/gl620a.c:172
Code: 04 28 84 c0 0f 85 ee 00 00 00 8b 1b 49 81 c4 90 00 00 00 4c 89 e0 48 c1 e8 03 42 8a 04 28 84 c0 0f 85 ef 00 00 00 89 d8 31 d2 <41> f7 34 24 89 d3 31 ff 89 d6 e8 2c 61 64 fe 85 db 74 07 e8 03 5d
RSP: 0018:ffffc900000070d0 EFLAGS: 00010246
RAX: 0000000000000062 RBX: 0000000000000062 RCX: ffffffff8641b000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888101dabbb0
RBP: ffffc90000007158 R08: ffffffff83089a30 R09: 0000000000000003
R10: fffff52000000e4d R11: 0000000000000004 R12: ffff8881081aca10
R13: dffffc0000000000 R14: ffff88810199a00e R15: ffff888101dabb40
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005558ffa4d368 CR3: 0000000115be6000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 usbnet_start_xmit+0x111/0x1a60 drivers/net/usb/usbnet.c:1338
 __netdev_start_xmit include/linux/netdevice.h:4823 [inline]
 netdev_start_xmit include/linux/netdevice.h:4837 [inline]
 xmit_one+0x16a/0x480 net/core/dev.c:3583
 dev_hard_start_xmit+0xad/0x1c0 net/core/dev.c:3599
 sch_direct_xmit+0x28f/0x9b0 net/sched/sch_generic.c:336
 qdisc_restart net/sched/sch_generic.c:401 [inline]
 __qdisc_run+0x245/0x3e0 net/sched/sch_generic.c:409
 qdisc_run include/net/pkt_sched.h:127 [inline]
 __dev_xmit_skb net/core/dev.c:3775 [inline]
 __dev_queue_xmit+0xe7e/0x2ac0 net/core/dev.c:4129
 dev_queue_xmit+0x17/0x20 net/core/dev.c:4194
 neigh_resolve_output+0x693/0x740 net/core/neighbour.c:1497
 neigh_output include/net/neighbour.h:518 [inline]
 ip6_finish_output2+0x109c/0x1930 net/ipv6/ip6_output.c:145
 __ip6_finish_output+0x610/0x7b0 net/ipv6/ip6_output.c:210
 ip6_finish_output+0x3f/0x1e0 net/ipv6/ip6_output.c:220
 NF_HOOK_COND include/linux/netfilter.h:293 [inline]
 ip6_output+0x211/0x4c0 net/ipv6/ip6_output.c:243
 dst_output include/net/dst.h:443 [inline]
 NF_HOOK include/linux/netfilter.h:304 [inline]
 mld_sendpack+0x5fc/0xb20 net/ipv6/mcast.c:1676
 mld_send_cr net/ipv6/mcast.c:1972 [inline]
 mld_ifc_timer_expire+0x85b/0xc50 net/ipv6/mcast.c:2471
 call_timer_fn+0x35/0x280 kernel/time/timer.c:1420
 expire_timers+0x21f/0x3b0 kernel/time/timer.c:1465
 __run_timers+0x548/0x680 kernel/time/timer.c:1756
 run_timer_softirq+0x69/0xf0 kernel/time/timer.c:1769
 __do_softirq+0x27e/0x598 kernel/softirq.c:305
 asm_call_irq_on_stack+0xf/0x20
 </IRQ>
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
 do_softirq_own_stack+0x60/0x80 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:402 [inline]
 __irq_exit_rcu+0x128/0x150 kernel/softirq.c:432
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:444
 sysvec_apic_timer_interrupt+0xbf/0xe0 arch/x86/kernel/apic/apic.c:1095
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:49 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:89 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:114 [inline]
RIP: 0010:acpi_idle_do_entry+0xbb/0x1f0 drivers/acpi/processor_idle.c:558
Code: 89 de 48 83 e6 08 31 ff e8 c2 64 cf fc 48 83 e3 08 0f 85 ae 00 00 00 e9 0c 00 00 00 e8 ee 5f cf fc 0f 00 2d 17 14 b4 00 fb f4 <fa> e9 a1 00 00 00 49 83 c6 04 4c 89 f0 48 c1 e8 03 42 8a 04 38 84
RSP: 0018:ffffffff86407be8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff849d98c7
RDX: ffffffff8641b000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff86407c00 R08: ffffffff849d98ee R09: fffffbfff0c83601
R10: fffffbfff0c83601 R11: 0000000000000000 R12: 0000000000000001
R13: ffff888101ffa804 R14: ffff8881057e0864 R15: dffffc0000000000
 acpi_idle_enter+0x32d/0x4f0 drivers/acpi/processor_idle.c:693
 cpuidle_enter_state+0x5d1/0x1470 drivers/cpuidle/cpuidle.c:249
 cpuidle_enter+0x5f/0xa0 drivers/cpuidle/cpuidle.c:364
 call_cpuidle kernel/sched/idle.c:160 [inline]
 cpuidle_idle_call kernel/sched/idle.c:241 [inline]
 do_idle+0x420/0x5e0 kernel/sched/idle.c:302
 cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:398
 rest_init+0xe6/0xf0 init/main.c:713
 arch_call_rest_init+0xe/0x10
 start_kernel+0x466/0x4d8 init/main.c:1052
 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:526
 x86_64_start_kernel+0x7a/0x7d arch/x86/kernel/head64.c:507
 secondary_startup_64_no_verify+0xb0/0xbb
Modules linked in:
---[ end trace 34069f639c72784a ]---
RIP: 0010:genelink_tx_fixup+0x415/0x5d0 drivers/net/usb/gl620a.c:172
Code: 04 28 84 c0 0f 85 ee 00 00 00 8b 1b 49 81 c4 90 00 00 00 4c 89 e0 48 c1 e8 03 42 8a 04 28 84 c0 0f 85 ef 00 00 00 89 d8 31 d2 <41> f7 34 24 89 d3 31 ff 89 d6 e8 2c 61 64 fe 85 db 74 07 e8 03 5d
RSP: 0018:ffffc900000070d0 EFLAGS: 00010246
RAX: 0000000000000062 RBX: 0000000000000062 RCX: ffffffff8641b000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888101dabbb0
RBP: ffffc90000007158 R08: ffffffff83089a30 R09: 0000000000000003
R10: fffff52000000e4d R11: 0000000000000004 R12: ffff8881081aca10
R13: dffffc0000000000 R14: ffff88810199a00e R15: ffff888101dabb40
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005558ffa4d368 CR3: 0000000115be6000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	04 28                	add    $0x28,%al
   2:	84 c0                	test   %al,%al
   4:	0f 85 ee 00 00 00    	jne    0xf8
   a:	8b 1b                	mov    (%rbx),%ebx
   c:	49 81 c4 90 00 00 00 	add    $0x90,%r12
  13:	4c 89 e0             	mov    %r12,%rax
  16:	48 c1 e8 03          	shr    $0x3,%rax
  1a:	42 8a 04 28          	mov    (%rax,%r13,1),%al
  1e:	84 c0                	test   %al,%al
  20:	0f 85 ef 00 00 00    	jne    0x115
  26:	89 d8                	mov    %ebx,%eax
  28:	31 d2                	xor    %edx,%edx
* 2a:	41 f7 34 24          	divl   (%r12) <-- trapping instruction
  2e:	89 d3                	mov    %edx,%ebx
  30:	31 ff                	xor    %edi,%edi
  32:	89 d6                	mov    %edx,%esi
  34:	e8 2c 61 64 fe       	callq  0xfe646165
  39:	85 db                	test   %ebx,%ebx
  3b:	74 07                	je     0x44
  3d:	e8                   	.byte 0xe8
  3e:	03                   	.byte 0x3
  3f:	5d                   	pop    %rbp

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-android-5-10 2021/10/24 22:36 android12-5.10-lts 234d53d2bb60 282f03fb .config console log report syz C divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/29 22:41 android12-5.10-lts 4944ec82ebb9 2353a3ec .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/25 19:14 android12-5.10-lts 234d53d2bb60 c1132b49 .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/25 17:38 android12-5.10-lts 234d53d2bb60 4f0000ee .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/25 17:01 android12-5.10-lts 234d53d2bb60 4f0000ee .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/25 09:52 android12-5.10-lts 234d53d2bb60 4f0000ee .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/25 08:26 android12-5.10-lts 234d53d2bb60 4f0000ee .config console log report info divide error in genelink_tx_fixup
ci2-android-5-10 2021/10/24 22:28 android12-5.10-lts 234d53d2bb60 282f03fb .config console log report info divide error in genelink_tx_fixup
* Struck through repros no longer work on HEAD.