syzbot


divide error in drm_mode_vrefresh

Status: upstream: reported C repro on 2023/06/21 15:11
Subsystems: dri
[Documentation on labels]
Reported-by: syzbot+622bba18029bcde672e1@syzkaller.appspotmail.com
First crash: 259d, last: 31d
Cause bisection: introduced by (bisect log) :
commit 565b4824c39fa335cba2028a09d7beb7112f3c9a
Author: Jiri Pirko <jiri@nvidia.com>
Date: Mon Feb 6 09:41:51 2023 +0000

  devlink: change port event netdev notifier from per-net to global

Crash: unregister_netdevice: waiting for DEV to become free (log)
Repro: C syz .config
  
Discussions (11)
Title Replies (including bot) Last reply
[syzbot] Monthly dri report (Feb 2024) 0 (1) 2024/02/02 21:05
[syzbot] Monthly dri report (Jan 2024) 0 (1) 2024/01/02 13:36
[syzbot] Monthly dri report (Nov 2023) 0 (1) 2023/11/30 20:33
[syzbot] Monthly dri report (Sep 2023) 0 (1) 2023/09/28 11:42
[syzbot] Monthly dri report (Aug 2023) 0 (1) 2023/08/27 14:06
[PATCH v3] drm/modes: Fix division by zero due to overflow 2 (2) 2023/08/03 09:35
[PATCH v2] drm/modes: Fix division by zero error 2 (2) 2023/08/02 10:04
Re: [PATCH] drm/modes: Fix division by zero error 1 (1) 2023/08/01 22:09
[PATCH] drm/modes: Fix division by zero error 3 (4) 2023/08/01 09:30
[syzbot] Monthly dri report (Jun 2023) 0 (1) 2023/06/26 18:48
[syzbot] [dri?] divide error in drm_mode_vrefresh 0 (1) 2023/06/21 15:11
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/02/17 03:16 22m retest repro linux-next error OK
2024/01/31 22:26 14m retest repro upstream report log
2024/01/13 08:08 36m retest repro upstream report log
2023/11/24 00:44 23m retest repro linux-next report log
2023/11/03 13:15 14m retest repro upstream report log
2023/09/14 13:08 48m retest repro linux-next report log
2023/08/25 08:39 2h59m (2) retest repro upstream report log
2023/08/25 08:39 16m retest repro upstream report log
2023/08/01 21:45 19m astrajoan@yahoo.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2023/07/09 01:12 1h15m astrajoan@yahoo.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/12/24 21:42 1h58m bisect fix upstream job log (0) log
2023/10/16 03:21 1h39m bisect fix upstream job log (0) log

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5052 Comm: syz-executor301 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:drm_mode_vrefresh+0x199/0x200 drivers/gpu/drm/drm_modes.c:1303
Code: 89 de e8 aa d9 8e fc 66 83 fb 01 76 08 e8 4f de 8e fc 0f af eb e8 47 de 8e fc 4d 69 e4 e8 03 00 00 89 e8 31 d2 d1 e8 4c 01 e0 <48> f7 f5 48 89 c3 e8 2c de 8e fc 89 d8 5b 5d 41 5c 41 5d 41 5e c3
RSP: 0018:ffffc9000345f9e0 EFLAGS: 00010206
RAX: 000000000001f400 RBX: 0000000000000400 RCX: ffffffff84f81af6
RDX: 0000000000000000 RSI: ffffffff84f81b09 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000001
R10: 0000000000000400 R11: ffffffff81ddd204 R12: 000000000001f400
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000008
FS:  0000555557375380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 000000007b190000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 drm_mode_debug_printmodeline+0x233/0x300 drivers/gpu/drm/drm_modes.c:60
 drm_mode_setcrtc+0x11ce/0x1680 drivers/gpu/drm/drm_crtc.c:793
 drm_ioctl_kernel+0x1e8/0x3d0 drivers/gpu/drm/drm_ioctl.c:744
 drm_ioctl+0x5d4/0xc00 drivers/gpu/drm/drm_ioctl.c:841
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fdde31c4729
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffecd041548 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffecd041718 RCX: 00007fdde31c4729
RDX: 0000000020000180 RSI: 00000000c06864a2 RDI: 0000000000000003
RBP: 00007fdde3237610 R08: 00000000fffff4e6 R09: 00007ffecd041718
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffecd041708 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:drm_mode_vrefresh+0x199/0x200 drivers/gpu/drm/drm_modes.c:1303
Code: 89 de e8 aa d9 8e fc 66 83 fb 01 76 08 e8 4f de 8e fc 0f af eb e8 47 de 8e fc 4d 69 e4 e8 03 00 00 89 e8 31 d2 d1 e8 4c 01 e0 <48> f7 f5 48 89 c3 e8 2c de 8e fc 89 d8 5b 5d 41 5c 41 5d 41 5e c3
RSP: 0018:ffffc9000345f9e0 EFLAGS: 00010206
RAX: 000000000001f400 RBX: 0000000000000400 RCX: ffffffff84f81af6
RDX: 0000000000000000 RSI: ffffffff84f81b09 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000001
R10: 0000000000000400 R11: ffffffff81ddd204 R12: 000000000001f400
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000008
FS:  0000555557375380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 000000007b190000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	89 de                	mov    %ebx,%esi
   2:	e8 aa d9 8e fc       	call   0xfc8ed9b1
   7:	66 83 fb 01          	cmp    $0x1,%bx
   b:	76 08                	jbe    0x15
   d:	e8 4f de 8e fc       	call   0xfc8ede61
  12:	0f af eb             	imul   %ebx,%ebp
  15:	e8 47 de 8e fc       	call   0xfc8ede61
  1a:	4d 69 e4 e8 03 00 00 	imul   $0x3e8,%r12,%r12
  21:	89 e8                	mov    %ebp,%eax
  23:	31 d2                	xor    %edx,%edx
  25:	d1 e8                	shr    %eax
  27:	4c 01 e0             	add    %r12,%rax
* 2a:	48 f7 f5             	div    %rbp <-- trapping instruction
  2d:	48 89 c3             	mov    %rax,%rbx
  30:	e8 2c de 8e fc       	call   0xfc8ede61
  35:	89 d8                	mov    %ebx,%eax
  37:	5b                   	pop    %rbx
  38:	5d                   	pop    %rbp
  39:	41 5c                	pop    %r12
  3b:	41 5d                	pop    %r13
  3d:	41 5e                	pop    %r14
  3f:	c3                   	ret

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/17 09:10 upstream 052d534373b7 2a7bcc7f .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root divide error in drm_mode_vrefresh
2023/07/17 19:05 upstream fdf0eaf11452 e5f10889 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root divide error in drm_mode_vrefresh
2023/06/17 15:45 upstream 1639fae5132b f3921d4d .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce divide error in drm_mode_vrefresh
2023/08/29 07:09 linux-next 2ee82481c392 7ba13a15 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root divide error in drm_mode_vrefresh
2023/06/17 15:08 upstream 1639fae5132b f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce divide error in drm_mode_vrefresh
2023/07/20 06:59 upstream bfa3037d8280 4547cdf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 divide error in drm_mode_vrefresh
* Struck through repros no longer work on HEAD.