syzbot


WARNING: refcount bug in drm_gem_mmap

Status: auto-obsoleted due to no activity on 2023/03/30 04:54
Subsystems: dri
[Documentation on labels]
Reported-by: syzbot+6a18ff929bb82f971e59@syzkaller.appspotmail.com
First crash: 445d, last: 445d

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 2862 at lib/refcount.c:28 refcount_warn_saturate+0x1a0/0x1c8 lib/refcount.c:28
Modules linked in:
CPU: 1 PID: 2862 Comm: syz-executor.0 Not tainted 6.1.0-rc8-syzkaller-33330-ga5541c0811a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : refcount_warn_saturate+0x1a0/0x1c8 lib/refcount.c:28
lr : refcount_warn_saturate+0x1a0/0x1c8 lib/refcount.c:28
sp : ffff800012f5ba90
x29: ffff800012f5ba90 x28: ffff00012fac2800 x27: 0000000020ffffff
x26: 0000000021000000 x25: 0000000000000003 x24: 0000000000000001
x23: ffff00011d7a1800 x22: ffff00011d7a1818 x21: ffff0000c4135000
x20: 0000000000000003 x19: ffff80000d95e000 x18: 00000000000000c0
x17: ffff80000dda8198 x16: ffff80000dbe6158 x15: ffff0001228c0000
x14: 0000000000000000 x13: 00000000ffffffff x12: 0000000000040000
x11: 000000000003ffff x10: ffff8000133af000 x9 : 280cee47bda86400
x8 : 280cee47bda86400 x7 : ffff80000c091ebc x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
 refcount_warn_saturate+0x1a0/0x1c8 lib/refcount.c:28
 __refcount_sub_and_test include/linux/refcount.h:283 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 kref_put include/linux/kref.h:64 [inline]
 __drm_gem_object_put include/drm/drm_gem.h:430 [inline]
 drm_gem_object_put include/drm/drm_gem.h:443 [inline]
 drm_gem_mmap+0x30c/0x37c drivers/gpu/drm/drm_gem.c:1121
 call_mmap include/linux/fs.h:2204 [inline]
 mmap_region+0x8a0/0x1064 mm/mmap.c:2622
 do_mmap+0x6e0/0xa28 mm/mmap.c:1412
 vm_mmap_pgoff+0xe8/0x1d0 mm/util.c:520
 ksys_mmap_pgoff+0x1cc/0x278 mm/mmap.c:1458
 __do_sys_mmap arch/arm64/kernel/sys.c:28 [inline]
 __se_sys_mmap arch/arm64/kernel/sys.c:21 [inline]
 __arm64_sys_mmap+0x58/0x6c arch/arm64/kernel/sys.c:21
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x140 arch/arm64/kernel/syscall.c:197
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
irq event stamp: 942596
hardirqs last  enabled at (942595): [<ffff8000081c3048>] __up_console_sem+0xb0/0xfc kernel/printk/printk.c:261
hardirqs last disabled at (942596): [<ffff80000c084084>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last  enabled at (941912): [<ffff8000080102e4>] _stext+0x2e4/0x37c
softirqs last disabled at (941905): [<ffff800008017c88>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/30 04:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: refcount bug in drm_gem_mmap
* Struck through repros no longer work on HEAD.