syzbot


divide error in ath9k_htc_swba

Status: upstream: reported C repro on 2021/06/18 09:25
Reported-by: syzbot+90d241d7661ca2493f0b@syzkaller.appspotmail.com
First crash: 469d, last: 80d

Cause bisection: introduced by (bisect log) [no-op commit]:
commit 7e49afc03212010d0ee27532a75cfeb0125bd868
Author: Masahiro Yamada <masahiroy@kernel.org>
Date: Fri Apr 17 18:04:55 2020 +0000

  um: do not evaluate compiler's library path when cleaning

Crash: UBSAN: division-overflow in ath9k_htc_swba (log)
Repro: C syz .config

Fix bisection: the fix commit could be any of (bisect log):
  e8b767f5e040 Merge tag 'for-linus-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
  1612c382ffbd Merge tag 'x86-urgent-2022-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Patch testing requests:
Created Duration User Patch Repo Result
2021/06/18 10:31 17m paskripkin@gmail.com patch upstream OK

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 21 Comm: ksoftirqd/1 Tainted: G        W         5.17.0-syzkaller-13673-ge8b767f5e040 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ath9k_htc_choose_bslot drivers/net/wireless/ath/ath9k/htc_drv_beacon.c:277 [inline]
RIP: 0010:ath9k_htc_swba+0x1b2/0xc70 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c:310
Code: c0 40 84 c6 0f 85 db 09 00 00 48 8b 55 00 0f b7 c9 bd 01 00 00 00 48 0f ca 48 89 d0 c1 ea 0a 48 c1 e8 20 c1 e0 16 09 d0 31 d2 <f7> f1 8d 04 12 31 d2 f7 f1 29 c5 48 8d 83 b0 03 00 00 48 89 c7 48
RSP: 0018:ffffc900003cfcb0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88806fa733a0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff8527728a R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff88807671340c R15: ffff88807d1751f0
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe835156111 CR3: 000000000ba8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ath9k_wmi_event_tasklet+0x33a/0x450 drivers/net/wireless/ath/ath9k/wmi.c:165
 tasklet_action_common.constprop.0+0x201/0x2e0 kernel/softirq.c:784
 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558
 run_ksoftirqd kernel/softirq.c:921 [inline]
 run_ksoftirqd+0x2d/0x60 kernel/softirq.c:913
----------------
Code disassembly (best guess):
   0:	c0 40 84 c6          	rolb   $0xc6,-0x7c(%rax)
   4:	0f 85 db 09 00 00    	jne    0x9e5
   a:	48 8b 55 00          	mov    0x0(%rbp),%rdx
   e:	0f b7 c9             	movzwl %cx,%ecx
  11:	bd 01 00 00 00       	mov    $0x1,%ebp
  16:	48 0f ca             	bswap  %rdx
  19:	48 89 d0             	mov    %rdx,%rax
  1c:	c1 ea 0a             	shr    $0xa,%edx
  1f:	48 c1 e8 20          	shr    $0x20,%rax
  23:	c1 e0 16             	shl    $0x16,%eax
  26:	09 d0                	or     %edx,%eax
  28:	31 d2                	xor    %edx,%edx
* 2a:	f7 f1                	div    %ecx <-- trapping instruction
  2c:	8d 04 12             	lea    (%rdx,%rdx,1),%eax
  2f:	31 d2                	xor    %edx,%edx
  31:	f7 f1                	div    %ecx
  33:	29 c5                	sub    %eax,%ebp
  35:	48 8d 83 b0 03 00 00 	lea    0x3b0(%rbx),%rax
  3c:	48 89 c7             	mov    %rax,%rdi
  3f:	48                   	rex.W

Crashes (12):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/04/01 23:37 upstream e8b767f5e040 20955a24 .config log report syz C divide error in ath9k_htc_swba
ci-upstream-kasan-gce-smack-root 2022/02/25 11:26 upstream 73878e5eb1bd 7c337266 .config log report syz C divide error in ath9k_htc_swba
ci-upstream-kasan-gce-root 2022/02/10 07:12 upstream f4bc5bbb5fef 0b33604d .config log report syz C divide error in ath9k_htc_swba
ci-upstream-kasan-gce 2021/08/09 18:22 upstream 36a21d51725a 6972b106 .config log report syz C divide error in ath9k_htc_swba
ci-upstream-linux-next-kasan-gce-root 2022/03/06 02:26 linux-next 91265a6da44d 7bdd8b2c .config log report syz C divide error in ath9k_htc_swba
ci2-upstream-usb 2021/06/14 10:08 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 37fdb7c90f8c 1ba81399 .config log report syz C divide error in ath9k_htc_swba
ci2-upstream-usb 2021/11/27 16:14 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing c4bc515d73b5 63eeac02 .config log report info divide error in ath9k_htc_swba
ci2-upstream-usb 2021/08/24 13:44 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing e4788edc730a b599f2fc .config log report info divide error in ath9k_htc_swba
ci2-upstream-usb 2021/08/05 08:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 64cd4271ea8e 7f7bb950 .config log report info divide error in ath9k_htc_swba
ci2-upstream-usb 2021/06/28 10:02 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 7756f1d6369e 9d2ab5df .config log report info divide error in ath9k_htc_swba
ci2-upstream-usb 2021/06/25 19:21 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 7756f1d6369e ae6bf8dd .config log report info divide error in ath9k_htc_swba
ci2-upstream-usb 2021/06/14 09:14 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 37fdb7c90f8c 1ba81399 .config log report info divide error in ath9k_htc_swba
* Struck through repros no longer work on HEAD.