================================================================== BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] BUG: KASAN: use-after-free in refcount_inc_not_zero_checked+0x72/0x160 lib/refcount.c:123 Read of size 4 at addr ffff88809860a1c8 by task syz-executor.3/21644 CPU: 0 PID: 21644 Comm: syz-executor.3 Not tainted 5.2.0-rc2+ #1 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+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/generic.c:191 kasan_check_read+0x11/0x20 mm/kasan/common.c:94 atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] refcount_inc_not_zero_checked+0x72/0x160 lib/refcount.c:123 refcount_inc_checked+0x9/0x30 lib/refcount.c:156 css_task_iter_next+0xc5/0x140 kernel/cgroup/cgroup.c:4534 pidlist_array_load+0x148/0x8d0 kernel/cgroup/cgroup-v1.c:373 cgroup_pidlist_start+0x333/0x530 kernel/cgroup/cgroup-v1.c:442 cgroup_seqfile_start+0xa7/0x100 kernel/cgroup/cgroup.c:3738 kernfs_seq_start+0xcc/0x170 fs/kernfs/file.c:118 seq_read+0x253/0x1000 fs/seq_file.c:224 kernfs_fop_read+0xcc/0x4f0 fs/kernfs/file.c:252 do_loop_readv_writev fs/read_write.c:714 [inline] do_iter_read+0x366/0x560 fs/read_write.c:935 vfs_readv+0xc9/0x130 fs/read_write.c:997 do_preadv+0x158/0x230 fs/read_write.c:1089 __do_sys_preadv fs/read_write.c:1139 [inline] __se_sys_preadv fs/read_write.c:1134 [inline] __x64_sys_preadv+0x95/0xf0 fs/read_write.c:1134 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459279 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f60b0f29c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459279 RDX: 0000000000000001 RSI: 0000000020000100 RDI: 0000000000000005 RBP: 000000000075c060 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f60b0f2a6d4 R13: 00000000004c614c R14: 00000000004da9a8 R15: 00000000ffffffff Allocated by task 21314: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 mm/kasan/common.c:489 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x154/0x740 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] find_css_set+0x5c5/0x1b00 kernel/cgroup/cgroup.c:1202 cgroup_migrate_prepare_dst+0xf2/0x6e0 kernel/cgroup/cgroup.c:2648 cgroup_attach_task+0x2df/0x630 kernel/cgroup/cgroup.c:2758 cgroup_attach_task_all+0xaf/0x120 kernel/cgroup/cgroup-v1.c:76 vhost_attach_cgroups_work+0x39/0x90 drivers/vhost/vhost.c:472 vhost_worker+0x251/0x4a0 drivers/vhost/vhost.c:362 kthread+0x324/0x3e0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 16: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 __rcu_reclaim kernel/rcu/rcu.h:215 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xc8e/0x1430 kernel/rcu/tree.c:2291 __do_softirq+0x260/0x958 kernel/softirq.c:293 The buggy address belongs to the object at ffff88809860a000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 456 bytes inside of 1024-byte region [ffff88809860a000, ffff88809860a400) The buggy address belongs to the page: page:ffffea0002618280 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0xffff88809860ad80 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000247d908 ffffea0002352c88 ffff8880aa400ac0 raw: ffff88809860ad80 ffff88809860a000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809860a080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809860a100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809860a180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809860a200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809860a280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================