syzbot


general protection fault in drm_atomic_set_crtc_for_connector

Status: fixed on 2021/10/15 09:09
Subsystems: dri
[Documentation on labels]
Reported-by: syzbot+1aec08e752387f55c449@syzkaller.appspotmail.com
Fix commit: 0003b687ee6d drm: fix oops in drm_atomic_set_crtc_for_connector
First crash: 1308d, last: 1307d
Cause bisection: introduced by (bisect log) [merge commit]:
commit bb72bbe8f6c70e67c85d773e5c9b04c7fe36a0ab
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri Nov 6 20:58:11 2020 +0000

  Merge tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Crash: BUG: sleeping function called from invalid context in sta_info_move_state (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in drm_atomic_set_crtc_for_connector 0 (1) 2020/11/20 07:25

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 8503 Comm: syz-executor619 Not tainted 5.10.0-rc3-next-20201116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:drm_atomic_set_crtc_for_connector+0x426/0x5f0 drivers/gpu/drm/drm_atomic_uapi.c:342
Code: 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e a6 00 00 00 48 b8 00 00 00 00 00 fc ff df 41 8b 4d 28 <80> 38 00 0f 85 83 01 00 00 48 8b 2c 25 00 00 00 00 48 b8 00 00 00
RSP: 0018:ffffc900018bf938 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880116b0100 RCX: 0000000000000022
RDX: 1ffff11003019a66 RSI: ffffffff84302d10 RDI: ffff8880180cd330
RBP: 0000000000000000 R08: ffff888018051900 R09: ffff8880180cd343
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88801a024800
R13: ffff8880180cd308 R14: ffff8880116b0108 R15: ffff88801cd1b700
FS:  0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006cf0a0 CR3: 000000000b08e000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 update_output_state drivers/gpu/drm/drm_atomic.c:1454 [inline]
 __drm_atomic_helper_set_config+0x72a/0xe80 drivers/gpu/drm/drm_atomic.c:1568
 drm_client_modeset_commit_atomic+0x527/0x7c0 drivers/gpu/drm/drm_client_modeset.c:1023
 drm_client_modeset_commit_locked+0x145/0x580 drivers/gpu/drm/drm_client_modeset.c:1145
 drm_client_modeset_commit+0x4d/0x80 drivers/gpu/drm/drm_client_modeset.c:1171
 __drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:252 [inline]
 __drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:231 [inline]
 drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:279 [inline]
 drm_fb_helper_lastclose drivers/gpu/drm/drm_fb_helper.c:1942 [inline]
 drm_fbdev_client_restore+0xe3/0x1a0 drivers/gpu/drm/drm_fb_helper.c:2334
 drm_client_dev_restore+0x17f/0x270 drivers/gpu/drm/drm_client.c:226
 drm_lastclose drivers/gpu/drm/drm_file.c:468 [inline]
 drm_release+0x441/0x530 drivers/gpu/drm/drm_file.c:499
 __fput+0x283/0x920 fs/file_table.c:280
 task_work_run+0xdd/0x190 kernel/task_work.c:140
 exit_task_work include/linux/task_work.h:30 [inline]
 do_exit+0xb9b/0x29f0 kernel/exit.c:823
 do_group_exit+0x125/0x310 kernel/exit.c:920
 __do_sys_exit_group kernel/exit.c:931 [inline]
 __se_sys_exit_group kernel/exit.c:929 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:929
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x443b18
Code: Unable to access opcode bytes at RIP 0x443aee.
RSP: 002b:00007fff6ec2d738 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b18
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace f24317b9689e8a7a ]---
RIP: 0010:drm_atomic_set_crtc_for_connector+0x426/0x5f0 drivers/gpu/drm/drm_atomic_uapi.c:342
Code: 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e a6 00 00 00 48 b8 00 00 00 00 00 fc ff df 41 8b 4d 28 <80> 38 00 0f 85 83 01 00 00 48 8b 2c 25 00 00 00 00 48 b8 00 00 00
RSP: 0018:ffffc900018bf938 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff8880116b0100 RCX: 0000000000000022
RDX: 1ffff11003019a66 RSI: ffffffff84302d10 RDI: ffff8880180cd330
RBP: 0000000000000000 R08: ffff888018051900 R09: ffff8880180cd343
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88801a024800
R13: ffff8880180cd308 R14: ffff8880116b0108 R15: ffff88801cd1b700
FS:  0000000000000000(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ee32e491f8 CR3: 0000000018634000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (586):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/16 16:16 linux-next 034307507118 1bf9a662 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/11/16 16:06 linux-next 034307507118 1bf9a662 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/11/17 11:22 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 11:03 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 09:44 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 08:43 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 08:00 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 06:36 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 06:22 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 04:53 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 03:53 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 03:19 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 01:41 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/17 00:37 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 23:33 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 23:20 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 22:07 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 21:00 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 20:57 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 19:56 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 19:44 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 18:43 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 18:05 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 17:16 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 15:13 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 14:57 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 13:35 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 12:55 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 11:46 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 11:29 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 11:14 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 10:59 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 10:45 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 10:26 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 10:11 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 09:58 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 09:45 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 09:26 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 09:08 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 08:49 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 08:33 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 08:19 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 08:04 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/11/16 07:15 linux-next 034307507118 1bf9a662 .config console log report info ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.