netlink: 'syz-executor.2': attribute type 1 has an invalid length. ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:261 [inline] BUG: KASAN: use-after-free in __read_seqcount_begin include/linux/seqlock.h:113 [inline] BUG: KASAN: use-after-free in raw_read_seqcount_begin include/linux/seqlock.h:148 [inline] BUG: KASAN: use-after-free in read_seqcount_begin include/linux/seqlock.h:165 [inline] BUG: KASAN: use-after-free in reservation_object_test_signaled_rcu+0xc37/0xdb0 drivers/dma-buf/reservation.c:600 Read of size 4 at addr ffff888026fc66d0 by task syz-executor.5/12991 CPU: 0 PID: 12991 Comm: syz-executor.5 Not tainted 4.19.197-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432 __read_once_size include/linux/compiler.h:261 [inline] __read_seqcount_begin include/linux/seqlock.h:113 [inline] raw_read_seqcount_begin include/linux/seqlock.h:148 [inline] read_seqcount_begin include/linux/seqlock.h:165 [inline] reservation_object_test_signaled_rcu+0xc37/0xdb0 drivers/dma-buf/reservation.c:600 vgem_fence_attach_ioctl+0x2c6/0x640 drivers/gpu/drm/vgem/vgem_fence.c:185 drm_ioctl_kernel+0x208/0x2a0 drivers/gpu/drm/drm_ioctl.c:758 drm_ioctl+0x507/0x9c0 drivers/gpu/drm/drm_ioctl.c:858 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f283fc50188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000020000140 RSI: 00000000c10c5541 RDI: 0000000000000004 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fffbbf9016f R14: 00007f283fc50300 R15: 0000000000022000 Allocated by task 12991: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] dma_buf_export+0x1f1/0xa20 drivers/dma-buf/dma-buf.c:416 drm_gem_dmabuf_export+0x17/0x80 drivers/gpu/drm/drm_prime.c:365 drm_gem_prime_export+0x182/0x200 drivers/gpu/drm/drm_prime.c:546 attach_dmabuf drivers/gpu/drm/vgem/vgem_fence.c:124 [inline] vgem_fence_attach_ioctl+0x395/0x640 drivers/gpu/drm/vgem/vgem_fence.c:173 drm_ioctl_kernel+0x208/0x2a0 drivers/gpu/drm/drm_ioctl.c:758 drm_ioctl+0x507/0x9c0 drivers/gpu/drm/drm_ioctl.c:858 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 12998: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 dma_buf_release+0x329/0x630 drivers/dma-buf/dma-buf.c:80 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888026fc64c0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 528 bytes inside of 1024-byte region [ffff888026fc64c0, ffff888026fc68c0) The buggy address belongs to the page: page:ffffea00009bf180 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff888026fc6040 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0001396c88 ffffea000105ca88 ffff88813bff0ac0 raw: ffff888026fc6040 ffff888026fc6040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888026fc6580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026fc6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888026fc6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026fc6700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026fc6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================