syzbot


divide error in drm_mode_debug_printmodeline

Status: upstream: reported C repro on 2023/11/15 09:34
Subsystems: dri
[Documentation on labels]
Reported-by: syzbot+2e93e6fb36e6fdc56574@syzkaller.appspotmail.com
First crash: 168d, last: 2d04h
Cause bisection: introduced by (bisect log) :
commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri Oct 9 23:21:56 2020 +0000

  drm/vkms: fbdev emulation support

Crash: divide error in drm_mode_vrefresh (log)
Repro: C syz .config
  
Discussions (14)
Title Replies (including bot) Last reply
[syzbot] Monthly dri report (Apr 2024) 0 (1) 2024/04/05 12:37
[syzbot] Monthly dri report (Jan 2024) 0 (1) 2024/01/02 13:36
Re: [PATCH V2] drm/modes: Fix divide error in drm_mode_debug_printmodeline 2 (2) 2023/11/21 09:20
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/20 13:30
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/20 12:22
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/20 12:00
Re: [PATCH] drm/modes: Fix divide error in drm_mode_debug_printmodeline 1 (1) 2023/11/20 11:31
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/19 01:31
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/18 11:59
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/18 10:29
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/18 06:44
Re: [syzbot] [PATCH] Test divide err in drm 0 (1) 2023/11/18 03:42
[syzbot] [dri?] divide error in drm_mode_debug_printmodeline 0 (3) 2023/11/16 03:29
Re: [syzbot] [PATCH] test divide error in drm_mode_debug_printmodeline 0 (1) 2023/11/16 00:52
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 divide error in drm_mode_debug_printmodeline origin:upstream C 1 26d 225d 0/3 upstream: reported C repro on 2023/09/15 11:23
linux-5.15 divide error in drm_mode_debug_printmodeline origin:upstream C 1 18d 273d 0/3 upstream: reported C repro on 2023/07/28 20:01
Last patch testing requests (13)
Created Duration User Patch Repo Result
2024/04/25 07:34 15m retest repro upstream report log
2023/11/25 09:43 14m retest repro upstream report log
2023/11/20 13:30 20m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/20 12:22 20m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db report log
2023/11/20 12:00 1h10m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/19 01:31 26m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/18 11:59 23m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/18 10:29 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/18 06:44 22m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db OK log
2023/11/18 03:42 59m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 888cf78c29e2 report log
2023/11/16 03:29 20m mazinalhaddad05@gmail.com patch upstream error OK
2023/11/16 02:33 37m mazinalhaddad05@gmail.com patch upstream error OK
2023/11/16 00:52 14m lizhi.xu@windriver.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ac347a0655db report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/02/10 18:46 2h02m bisect fix upstream job log (0) log
2023/12/26 05:43 1h25m bisect fix upstream job log (0) log

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5068 Comm: syz-executor357 Not tainted 6.6.0-syzkaller-16039-gac347a0655db #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:drm_mode_vrefresh drivers/gpu/drm/drm_modes.c:1303 [inline]
RIP: 0010:drm_mode_debug_printmodeline+0x118/0x4e0 drivers/gpu/drm/drm_modes.c:60
Code: 00 41 0f b7 07 66 83 f8 02 b9 01 00 00 00 0f 43 c8 0f b7 c1 0f af e8 44 89 f0 48 69 c8 e8 03 00 00 89 e8 d1 e8 48 01 c8 31 d2 <48> f7 f5 49 89 c6 eb 0c e8 fb 07 66 fc eb 05 e8 f4 07 66 fc 48 89
RSP: 0018:ffffc9000391f8d0 EFLAGS: 00010246
RAX: 000000000001f400 RBX: ffff888025045000 RCX: 000000000001f400
RDX: 0000000000000000 RSI: 0000000000008000 RDI: ffff888025045018
RBP: 0000000000000000 R08: ffffffff8528b9af R09: 0000000000000000
R10: ffffc9000391f8a0 R11: fffff52000723f17 R12: 0000000000000080
R13: dffffc0000000000 R14: 0000000000000080 R15: ffff888025045016
FS:  0000555556932380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 000000007fcff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 drm_mode_setcrtc+0x83b/0x1880 drivers/gpu/drm/drm_crtc.c:794
 drm_ioctl_kernel+0x362/0x500 drivers/gpu/drm/drm_ioctl.c:792
 drm_ioctl+0x636/0xb00 drivers/gpu/drm/drm_ioctl.c:895
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f6c63dd6729
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:00007ffcde0dd0e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffcde0dd2b8 RCX: 00007f6c63dd6729
RDX: 0000000020000180 RSI: 00000000c06864a2 RDI: 0000000000000003
RBP: 00007f6c63e49610 R08: 00000000fffff4e6 R09: 00007ffcde0dd2b8
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffcde0dd2a8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:drm_mode_vrefresh drivers/gpu/drm/drm_modes.c:1303 [inline]
RIP: 0010:drm_mode_debug_printmodeline+0x118/0x4e0 drivers/gpu/drm/drm_modes.c:60
Code: 00 41 0f b7 07 66 83 f8 02 b9 01 00 00 00 0f 43 c8 0f b7 c1 0f af e8 44 89 f0 48 69 c8 e8 03 00 00 89 e8 d1 e8 48 01 c8 31 d2 <48> f7 f5 49 89 c6 eb 0c e8 fb 07 66 fc eb 05 e8 f4 07 66 fc 48 89
RSP: 0018:ffffc9000391f8d0 EFLAGS: 00010246
RAX: 000000000001f400 RBX: ffff888025045000 RCX: 000000000001f400
RDX: 0000000000000000 RSI: 0000000000008000 RDI: ffff888025045018
RBP: 0000000000000000 R08: ffffffff8528b9af R09: 0000000000000000
R10: ffffc9000391f8a0 R11: fffff52000723f17 R12: 0000000000000080
R13: dffffc0000000000 R14: 0000000000000080 R15: ffff888025045016
FS:  0000555556932380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000064392c CR3: 000000007fcff000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 41 0f             	add    %al,0xf(%rcx)
   3:	b7 07                	mov    $0x7,%bh
   5:	66 83 f8 02          	cmp    $0x2,%ax
   9:	b9 01 00 00 00       	mov    $0x1,%ecx
   e:	0f 43 c8             	cmovae %eax,%ecx
  11:	0f b7 c1             	movzwl %cx,%eax
  14:	0f af e8             	imul   %eax,%ebp
  17:	44 89 f0             	mov    %r14d,%eax
  1a:	48 69 c8 e8 03 00 00 	imul   $0x3e8,%rax,%rcx
  21:	89 e8                	mov    %ebp,%eax
  23:	d1 e8                	shr    %eax
  25:	48 01 c8             	add    %rcx,%rax
  28:	31 d2                	xor    %edx,%edx
* 2a:	48 f7 f5             	div    %rbp <-- trapping instruction
  2d:	49 89 c6             	mov    %rax,%r14
  30:	eb 0c                	jmp    0x3e
  32:	e8 fb 07 66 fc       	call   0xfc660832
  37:	eb 05                	jmp    0x3e
  39:	e8 f4 07 66 fc       	call   0xfc660832
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/11 09:28 upstream ac347a0655db 6d6dbf8a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root divide error in drm_mode_debug_printmodeline
2024/04/03 07:28 upstream 480e035fc4c7 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce divide error in drm_mode_debug_printmodeline
2024/03/26 13:00 upstream 480e035fc4c7 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce divide error in drm_mode_debug_printmodeline
2024/02/29 08:35 upstream e326df53af00 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 divide error in drm_mode_debug_printmodeline
* Struck through repros no longer work on HEAD.