================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff88808ffeab1c by task syz-executor.0/32115 CPU: 1 PID: 32115 Comm: syz-executor.0 Not tainted 5.2.0-rc3-next-20190607 #11 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 css_task_iter_start+0x18b/0x230 kernel/cgroup/cgroup.c:4543 update_tasks_flags+0x85/0x100 kernel/cgroup/cpuset.c:1836 update_flag+0x232/0x470 kernel/cgroup/cpuset.c:1886 cpuset_write_u64+0x222/0x270 kernel/cgroup/cpuset.c:2268 cgroup_file_write+0x4db/0x790 kernel/cgroup/cgroup.c:3727 kernfs_fop_write+0x2b8/0x480 fs/kernfs/file.c:316 __vfs_write+0x8a/0x110 fs/read_write.c:494 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfd/0x680 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:00007ff8e4e27c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459279 RDX: 0000000000000012 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff8e4e286d4 R13: 00000000004c911b R14: 00000000004e0098 R15: 00000000ffffffff Allocated by task 8848: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 __do_kmalloc mm/slab.c:3654 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3663 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:742 [inline] neigh_alloc net/core/neighbour.c:402 [inline] ___neigh_create+0x122a/0x2350 net/core/neighbour.c:580 __neigh_create+0x2f/0x40 net/core/neighbour.c:674 ip6_finish_output2+0x94f/0x2550 net/ipv6/ip6_output.c:113 __ip6_finish_output+0x444/0xaa0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0x235/0x7f0 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:433 [inline] NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] mld_sendpack+0x9c7/0xed0 net/ipv6/mcast.c:1681 mld_send_cr net/ipv6/mcast.c:1977 [inline] mld_ifc_timer_expire+0x449/0x8a0 net/ipv6/mcast.c:2476 call_timer_fn+0x193/0x720 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] __run_timers kernel/time/timer.c:1653 [inline] run_timer_softirq+0x66f/0x1740 kernel/time/timer.c:1698 __do_softirq+0x25c/0x94c kernel/softirq.c:293 Freed by task 7: save_stack+0x23/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:3426 [inline] kfree+0x106/0x2a0 mm/slab.c:3753 __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+0xcc7/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:293 The buggy address belongs to the object at ffff88808ffea940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 476 bytes inside of 1024-byte region [ffff88808ffea940, ffff88808ffead40) The buggy address belongs to the page: page:ffffea00023ffa80 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0xffff88808ffea940 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002469f88 ffffea0002343208 ffff8880aa400ac0 raw: ffff88808ffea940 ffff88808ffea040 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808ffeaa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808ffeaa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808ffeab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808ffeab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808ffeac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================