syzbot


divide error in drm_mode_debug_printmodeline

Status: upstream: reported C repro on 2023/07/28 20:01
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+0ce9593e9b1b1e16849e@syzkaller.appspotmail.com
First crash: 282d, last: 27d
Bug presence (1)
Date Name Commit Repro Result
2023/07/28 upstream (ToT) f837f0a3c948 C [report] divide error in drm_mode_debug_printmodeline
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in drm_mode_debug_printmodeline dri C done 4 11d 173d 0/26 upstream: reported C repro on 2023/11/15 09:34
linux-6.1 divide error in drm_mode_debug_printmodeline origin:upstream C 1 5d08h 234d 0/3 upstream: reported C repro on 2023/09/15 11:23
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/04/08 19:11 1h27m bisect fix linux-5.15.y job log (0) log
2024/03/08 18:19 1h02m bisect fix linux-5.15.y job log (0) log
2024/02/03 05:24 1h08m bisect fix linux-5.15.y job log (0) log
2023/12/31 00:19 49m bisect fix linux-5.15.y job log (0) log
2023/11/30 16:51 1h05m bisect fix linux-5.15.y job log (0) log
2023/10/30 11:47 2h22m bisect fix linux-5.15.y job log (0) log
2023/09/28 19:13 1h00m bisect fix linux-5.15.y job log (0) log

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3500 Comm: syz-executor143 Not tainted 5.15.123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
RIP: 0010:drm_mode_vrefresh drivers/gpu/drm/drm_modes.c:775 [inline]
RIP: 0010:drm_mode_debug_printmodeline+0x114/0x500 drivers/gpu/drm/drm_modes.c:56
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 7f b9 ef fc eb 05 e8 78 b9 ef fc 48 89
RSP: 0018:ffffc90002d8f918 EFLAGS: 00010246
RAX: 000000000001f400 RBX: ffff888075827000 RCX: 000000000001f400
RDX: 0000000000000000 RSI: 0000000000008000 RDI: ffff888075827018
RBP: 0000000000000000 R08: ffffffff8490464b R09: ffffc90002d8f8e0
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000080 R14: 0000000000000080 R15: ffff888075827016
FS:  000055555610f380(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 0000000073262000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 drm_mode_setcrtc+0x825/0x1870 drivers/gpu/drm/drm_crtc.c:722
 drm_ioctl_kernel+0x345/0x4f0 drivers/gpu/drm/drm_ioctl.c:801
 drm_ioctl+0x60d/0x9d0 drivers/gpu/drm/drm_ioctl.c:904
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f0a4748b729
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:00007ffea74a36c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffea74a3898 RCX: 00007f0a4748b729
RDX: 0000000020000180 RSI: 00000000c06864a2 RDI: 0000000000000003
RBP: 00007f0a474fe610 R08: 00000000fffff4e6 R09: 00007ffea74a3898
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffea74a3888 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 4074a93e295744a6 ]---
RIP: 0010:drm_mode_vrefresh drivers/gpu/drm/drm_modes.c:775 [inline]
RIP: 0010:drm_mode_debug_printmodeline+0x114/0x500 drivers/gpu/drm/drm_modes.c:56
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 7f b9 ef fc eb 05 e8 78 b9 ef fc 48 89
RSP: 0018:ffffc90002d8f918 EFLAGS: 00010246
RAX: 000000000001f400 RBX: ffff888075827000 RCX: 000000000001f400
RDX: 0000000000000000 RSI: 0000000000008000 RDI: ffff888075827018
RBP: 0000000000000000 R08: ffffffff8490464b R09: ffffc90002d8f8e0
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000080 R14: 0000000000000080 R15: ffff888075827016
FS:  000055555610f380(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560cdc784000 CR3: 0000000073262000 CR4: 00000000003506e0
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 7f b9 ef fc       	call   0xfcefb9b6
  37:	eb 05                	jmp    0x3e
  39:	e8 78 b9 ef fc       	call   0xfcefb9b6
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/28 20:01 linux-5.15.y 09996673e313 92476829 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan divide error in drm_mode_debug_printmodeline
* Struck through repros no longer work on HEAD.