================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff888099c8621c by task syz-executor.0/25610 CPU: 1 PID: 25610 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 mem_cgroup_scan_tasks+0xaf/0x180 mm/memcontrol.c:1167 select_bad_process mm/oom_kill.c:374 [inline] out_of_memory mm/oom_kill.c:1088 [inline] out_of_memory+0x6b2/0x1280 mm/oom_kill.c:1035 mem_cgroup_out_of_memory+0x1ca/0x230 mm/memcontrol.c:1573 mem_cgroup_oom mm/memcontrol.c:1905 [inline] try_charge+0xfbe/0x1480 mm/memcontrol.c:2468 mem_cgroup_try_charge+0x24d/0x5e0 mm/memcontrol.c:6073 mem_cgroup_try_charge_delay+0x1f/0xa0 mm/memcontrol.c:6088 wp_page_copy+0x416/0x1770 mm/memory.c:2358 do_wp_page+0x48e/0x1500 mm/memory.c:2653 handle_pte_fault mm/memory.c:3908 [inline] __handle_mm_fault+0x22e3/0x3eb0 mm/memory.c:4016 handle_mm_fault+0x3b7/0xa90 mm/memory.c:4053 do_user_addr_fault arch/x86/mm/fault.c:1455 [inline] __do_page_fault+0x5ef/0xda0 arch/x86/mm/fault.c:1521 do_page_fault+0x71/0x57d arch/x86/mm/fault.c:1552 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1156 RIP: 0033:0x414a53 Code: e9 4c 89 e2 ff 74 24 48 4c 8b 4c 24 10 89 ee 4c 8b 44 24 18 48 89 df e8 cb f7 ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 48 f7 d8 <64> 89 04 25 d4 ff ff ff 48 83 c8 ff c3 48 81 ec 98 00 00 00 31 ff RSP: 002b:00007ffdedbe0ac8 EFLAGS: 00010213 RAX: 000000000000006e RBX: 000000000000002d RCX: 0000000000459279 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bfcc RBP: 00000000000003e8 R08: ffffffffffffffff R09: ffffffffffffffff R10: 00007ffdedbe0ba0 R11: 0000000000000246 R12: 000000000075bfc0 R13: 0000000000097ecf R14: 0000000000097efc R15: 000000000075bfcc Allocated by task 8746: 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] ndisc_send_skb+0xf29/0x14a0 net/ipv6/ndisc.c:504 ndisc_send_rs+0x134/0x6d0 net/ipv6/ndisc.c:698 addrconf_rs_timer+0x30f/0x680 net/ipv6/addrconf.c:3878 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 9: 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 ffff888099c86040 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 476 bytes inside of 1024-byte region [ffff888099c86040, ffff888099c86440) The buggy address belongs to the page: page:ffffea0002672180 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002229f88 ffffea0002262b88 ffff8880aa400ac0 raw: 0000000000000000 ffff888099c86040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099c86100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099c86180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888099c86200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099c86280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099c86300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================