================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff8880a9780b24 by task syz-executor.4/25432 CPU: 1 PID: 25432 Comm: syz-executor.4 Not tainted 5.2.0-rc3-next-20190605 #9 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 __memcg_kmem_charge_memcg+0x7c/0x130 mm/memcontrol.c:2775 __memcg_kmem_charge+0x136/0x300 mm/memcontrol.c:2808 __alloc_pages_nodemask+0x4bd/0x8d0 mm/page_alloc.c:4697 __alloc_pages include/linux/gfp.h:473 [inline] __alloc_pages_node include/linux/gfp.h:486 [inline] alloc_pages_node include/linux/gfp.h:500 [inline] alloc_thread_stack_node kernel/fork.c:248 [inline] dup_task_struct kernel/fork.c:852 [inline] copy_process.part.0+0x492/0x6800 kernel/fork.c:1894 copy_process kernel/fork.c:1826 [inline] _do_fork+0x25d/0xfe0 kernel/fork.c:2395 __do_sys_clone kernel/fork.c:2502 [inline] __se_sys_clone kernel/fork.c:2496 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2496 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45bc49 Code: ff 48 85 f6 0f 84 27 8e fb ff 48 83 ee 10 48 89 4e 08 48 89 3e 48 89 d7 4c 89 c2 4d 89 c8 4c 8b 54 24 08 b8 38 00 00 00 0f 05 <48> 85 c0 0f 8c fe 8d fb ff 74 01 c3 31 ed 48 f7 c7 00 00 01 00 75 RSP: 002b:00007ffee0bae288 EFLAGS: 00000202 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007f7b40981700 RCX: 000000000045bc49 RDX: 00007f7b409819d0 RSI: 00007f7b40980db0 RDI: 00000000003d0f00 RBP: 00007ffee0bae4a0 R08: 00007f7b40981700 R09: 00007f7b40981700 R10: 00007f7b409819d0 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffee0bae33f R14: 00007f7b409819c0 R15: 000000000075bf2c Allocated by task 8945: 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] netlink_alloc_large_skb net/netlink/af_netlink.c:1179 [inline] netlink_sendmsg+0x972/0xd60 net/netlink/af_netlink.c:1897 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 ___sys_sendmsg+0x803/0x920 net/socket.c:2287 __sys_sendmsg+0x105/0x1d0 net/socket.c:2332 __do_sys_sendmsg net/socket.c:2341 [inline] __se_sys_sendmsg net/socket.c:2339 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2339 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8945: 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_unicast_kernel net/netlink/af_netlink.c:1308 [inline] netlink_unicast+0x539/0x710 net/netlink/af_netlink.c:1333 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1922 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 ___sys_sendmsg+0x803/0x920 net/socket.c:2287 __sys_sendmsg+0x105/0x1d0 net/socket.c:2332 __do_sys_sendmsg net/socket.c:2341 [inline] __se_sys_sendmsg net/socket.c:2339 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2339 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a9780940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 484 bytes inside of 1024-byte region [ffff8880a9780940, ffff8880a9780d40) The buggy address belongs to the page: page:ffffea0002a5e000 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0xffff8880a9780dc0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002897588 ffffea0002502e08 ffff8880aa400ac0 raw: ffff8880a9780dc0 ffff8880a9780040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9780a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a9780a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a9780b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a9780b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a9780c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================