================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff88808f860b1c by task syz-executor.1/10339 CPU: 1 PID: 10339 Comm: syz-executor.1 Not tainted 5.2.0-rc3-next-20190606 #10 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_next+0x149/0x1f0 kernel/cgroup/cgroup.c:4573 mem_cgroup_scan_tasks+0xbb/0x180 mm/memcontrol.c:1168 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:0x40f3d8 Code: 48 8b 05 e3 4a 30 00 48 89 08 48 8b 15 e1 4a 30 00 48 89 42 08 48 8b 05 c6 4a 30 00 48 89 05 cf 4a 30 00 49 8d 81 c0 02 00 00 <48> 89 05 d1 10 66 00 49 8b 89 c8 02 00 00 49 8b 91 c0 02 00 00 48 RSP: 002b:00007ffeab805b18 EFLAGS: 00010246 RAX: 0000555556712c00 RBX: 00007ffeab805b20 RCX: 0000000000713ea0 RDX: 000000000040f210 RSI: 0000000000713e90 RDI: 0000555556712c20 RBP: 00007ffeab805b60 R08: 0000000000000001 R09: 0000555556712940 R10: 0000555556712c10 R11: 0000000000000202 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffeab805bb0 Allocated by task 28921: 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_node mm/slab.c:3614 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3628 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:139 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:207 alloc_skb include/linux/skbuff.h:1054 [inline] nlmsg_new include/net/netlink.h:885 [inline] inet6_rt_notify+0xf9/0x2b0 net/ipv6/route.c:5343 fib6_del_route net/ipv6/ip6_fib.c:1821 [inline] fib6_del+0xbd3/0xeb0 net/ipv6/ip6_fib.c:1848 fib6_clean_node+0x3a5/0x590 net/ipv6/ip6_fib.c:2010 fib6_walk_continue+0x4a9/0x8e0 net/ipv6/ip6_fib.c:1932 fib6_walk+0x9d/0x100 net/ipv6/ip6_fib.c:1980 fib6_clean_tree+0xe0/0x120 net/ipv6/ip6_fib.c:2059 __fib6_clean_all+0x118/0x2a0 net/ipv6/ip6_fib.c:2075 fib6_clean_all+0x2b/0x40 net/ipv6/ip6_fib.c:2086 rt6_sync_down_dev+0x134/0x150 net/ipv6/route.c:4343 rt6_disable_ip+0x27/0x5f0 net/ipv6/route.c:4348 addrconf_ifdown+0xa2/0x1220 net/ipv6/addrconf.c:3707 addrconf_notify+0x5db/0x2370 net/ipv6/addrconf.c:3632 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] dev_close_many+0x33f/0x6f0 net/core/dev.c:1518 rollback_registered_many+0x43b/0xfc0 net/core/dev.c:8155 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9286 unregister_netdevice_many net/core/dev.c:9285 [inline] default_device_exit_batch+0x34e/0x410 net/core/dev.c:9755 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:157 cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 28921: 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 skb_free_head+0x93/0xb0 net/core/skbuff.c:589 skb_release_data+0x42d/0x7c0 net/core/skbuff.c:609 skb_release_all+0x4d/0x60 net/core/skbuff.c:663 __kfree_skb net/core/skbuff.c:677 [inline] consume_skb net/core/skbuff.c:737 [inline] consume_skb+0xe2/0x380 net/core/skbuff.c:731 netlink_broadcast_filtered+0x316/0xb20 net/netlink/af_netlink.c:1517 netlink_broadcast net/netlink/af_netlink.c:1539 [inline] nlmsg_multicast include/net/netlink.h:965 [inline] nlmsg_notify+0x93/0x1c0 net/netlink/af_netlink.c:2525 rtnl_notify+0xc5/0xf0 net/core/rtnetlink.c:737 inet6_rt_notify+0x1fc/0x2b0 net/ipv6/route.c:5355 fib6_del_route net/ipv6/ip6_fib.c:1821 [inline] fib6_del+0xbd3/0xeb0 net/ipv6/ip6_fib.c:1848 fib6_clean_node+0x3a5/0x590 net/ipv6/ip6_fib.c:2010 fib6_walk_continue+0x4a9/0x8e0 net/ipv6/ip6_fib.c:1932 fib6_walk+0x9d/0x100 net/ipv6/ip6_fib.c:1980 fib6_clean_tree+0xe0/0x120 net/ipv6/ip6_fib.c:2059 __fib6_clean_all+0x118/0x2a0 net/ipv6/ip6_fib.c:2075 fib6_clean_all+0x2b/0x40 net/ipv6/ip6_fib.c:2086 rt6_sync_down_dev+0x134/0x150 net/ipv6/route.c:4343 rt6_disable_ip+0x27/0x5f0 net/ipv6/route.c:4348 addrconf_ifdown+0xa2/0x1220 net/ipv6/addrconf.c:3707 addrconf_notify+0x5db/0x2370 net/ipv6/addrconf.c:3632 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] dev_close_many+0x33f/0x6f0 net/core/dev.c:1518 rollback_registered_many+0x43b/0xfc0 net/core/dev.c:8155 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9286 unregister_netdevice_many net/core/dev.c:9285 [inline] default_device_exit_batch+0x34e/0x410 net/core/dev.c:9755 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:157 cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88808f860940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 476 bytes inside of 1024-byte region [ffff88808f860940, ffff88808f860d40) The buggy address belongs to the page: page:ffffea00023e1800 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002890b08 ffffea00023c1288 ffff8880aa400ac0 raw: 0000000000000000 ffff88808f860040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f860a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808f860a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808f860b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808f860b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808f860c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================