Re: [syzbot] [dri?] KASAN: slab-use-after-free Read in drm_gem_object_release_handle

syzbot
2026-04-15T08:50:03Z

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in drm_gem_object_release_handle

============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.2.19/6521 is trying to acquire lock:
ffff88801d349388 (&prime_fpriv->lock){+.+.}-{4:4}, at: drm_gem_object_release_handle+0x98/0x1e0 drivers/gpu/drm/drm_gem.c:377

but task is already holding lock:
ffff88801d349388 (&prime_fpriv->lock){+.+.}-{4:4}, at: drm_gem_release+0x90/0x190 drivers/gpu/drm/drm_gem.c:1087

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(&prime_fpriv->lock);
lock(&prime_fpriv->lock);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz.2.19/6521:
#0: ffff88801d349388 (&prime_fpriv->lock){+.+.}-{4:4}, at: drm_gem_release+0x90/0x190 drivers/gpu/drm/drm_gem.c:1087

stack backtrace:
CPU: 1 UID: 0 PID: 6521 Comm: syz.2.19 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041
check_deadlock kernel/locking/lockdep.c:3093 [inline]
validate_chain kernel/locking/lockdep.c:3895 [inline]
__lock_acquire+0x253f/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/mutex.c:632 [inline]
__mutex_lock+0x1a3/0x1550 kernel/locking/mutex.c:806
drm_gem_object_release_handle+0x98/0x1e0 drivers/gpu/drm/drm_gem.c:377
drm_gem_release+0xe5/0x190 drivers/gpu/drm/drm_gem.c:1097
drm_file_free+0x729/0xa00 drivers/gpu/drm/drm_file.c:261
drm_close_helper drivers/gpu/drm/drm_file.c:290 [inline]
drm_release+0x2de/0x3f0 drivers/gpu/drm/drm_file.c:438
__fput+0x44f/0xa60 fs/file_table.c:510
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline]
do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f141259c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcebeea6c8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffcebeea7b0 RCX: 00007f141259c819
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 000000000001fd63 R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b31120000 R11: 0000000000000246 R12: 00007ffcebeea7f0
R13: 00007f141281609c R14: 000000000001fdc6 R15: 00007f1412816090
</TASK>

Tested on:

commit: 1f5ffc67 Fix mismerge of the arm64 / timer-core interr..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=145ebb16580000
kernel config: https://syzkaller.appspot.com/x/.config?x=95729ed00549063a
dashboard link: https://syzkaller.appspot.com/bug?extid=b2e951687503f32f74ce
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=150dfcd2580000