==================================================================
BUG: KASAN: use-after-free in vgem_gem_dumb_create+0x178/0x320 drivers/gpu/drm/vgem/vgem_drv.c:221
Read of size 8 at addr ffff8880a2294108 by task syz-executor.0/11370

CPU: 1 PID: 11370 Comm: syz-executor.0 Not tainted 5.5.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fb/0x318 lib/dump_stack.c:118
 print_address_description+0x74/0x5c0 mm/kasan/report.c:374
 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506
 kasan_report+0x26/0x50 mm/kasan/common.c:641
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135
 vgem_gem_dumb_create+0x178/0x320 drivers/gpu/drm/vgem/vgem_drv.c:221
 drm_mode_create_dumb drivers/gpu/drm/drm_dumb_buffers.c:94 [inline]
 drm_mode_create_dumb_ioctl+0x22e/0x2a0 drivers/gpu/drm/drm_dumb_buffers.c:100
 drm_ioctl_kernel+0x2cf/0x410 drivers/gpu/drm/drm_ioctl.c:786
 drm_ioctl+0x52f/0x890 drivers/gpu/drm/drm_ioctl.c:886
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl fs/ioctl.c:747 [inline]
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl+0x113/0x190 fs/ioctl.c:754
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:754
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45b399
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fe65651bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe65651c6d4 RCX: 000000000045b399
RDX: 0000000020000000 RSI: 00000000c02064b2 RDI: 0000000000000009
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000285 R14: 00000000004d1598 R15: 000000000075bf2c

Allocated by task 11370:
 save_stack mm/kasan/common.c:72 [inline]
 set_track mm/kasan/common.c:80 [inline]
 __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529
 kmem_cache_alloc_trace+0x221/0x2f0 mm/slab.c:3551
 kmalloc include/linux/slab.h:555 [inline]
 kzalloc include/linux/slab.h:669 [inline]
 __vgem_gem_create drivers/gpu/drm/vgem/vgem_drv.c:165 [inline]
 vgem_gem_create drivers/gpu/drm/vgem/vgem_drv.c:194 [inline]
 vgem_gem_dumb_create+0xd8/0x320 drivers/gpu/drm/vgem/vgem_drv.c:217
 drm_mode_create_dumb drivers/gpu/drm/drm_dumb_buffers.c:94 [inline]
 drm_mode_create_dumb_ioctl+0x22e/0x2a0 drivers/gpu/drm/drm_dumb_buffers.c:100
 drm_ioctl_kernel+0x2cf/0x410 drivers/gpu/drm/drm_ioctl.c:786
 drm_ioctl+0x52f/0x890 drivers/gpu/drm/drm_ioctl.c:886
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl fs/ioctl.c:747 [inline]
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl+0x113/0x190 fs/ioctl.c:754
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:754
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 11370:
 save_stack mm/kasan/common.c:72 [inline]
 set_track mm/kasan/common.c:80 [inline]
 kasan_set_free_info mm/kasan/common.c:337 [inline]
 __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485
 __cache_free mm/slab.c:3426 [inline]
 kfree+0x10d/0x220 mm/slab.c:3757
 vgem_gem_free_object+0xb5/0xc0 drivers/gpu/drm/vgem/vgem_drv.c:68
 drm_gem_object_free drivers/gpu/drm/drm_gem.c:983 [inline]
 kref_put include/linux/kref.h:65 [inline]
 drm_gem_object_put_unlocked+0x33a/0x4b0 drivers/gpu/drm/drm_gem.c:1017
 vgem_gem_create drivers/gpu/drm/vgem/vgem_drv.c:199 [inline]
 vgem_gem_dumb_create+0x265/0x320 drivers/gpu/drm/vgem/vgem_drv.c:217
 drm_mode_create_dumb drivers/gpu/drm/drm_dumb_buffers.c:94 [inline]
 drm_mode_create_dumb_ioctl+0x22e/0x2a0 drivers/gpu/drm/drm_dumb_buffers.c:100
 drm_ioctl_kernel+0x2cf/0x410 drivers/gpu/drm/drm_ioctl.c:786
 drm_ioctl+0x52f/0x890 drivers/gpu/drm/drm_ioctl.c:886
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl fs/ioctl.c:747 [inline]
 __do_sys_ioctl fs/ioctl.c:756 [inline]
 __se_sys_ioctl+0x113/0x190 fs/ioctl.c:754
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:754
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880a2294000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 264 bytes inside of
 1024-byte region [ffff8880a2294000, ffff8880a2294400)
The buggy address belongs to the page:
page:ffffea000288a500 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea00028a7748 ffffea000235ab48 ffff8880aa400c40
raw: 0000000000000000 ffff8880a2294000 0000000100000002 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a2294000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a2294080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880a2294100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff8880a2294180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a2294200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================