================================================================== BUG: KASAN: slab-out-of-bounds in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff8880a998149c by task syz-executor.2/31762 CPU: 0 PID: 31762 Comm: syz-executor.2 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:0x40bc28 Code: 00 00 49 8d be 88 00 00 00 48 89 ea 48 89 de 0f 85 dd 00 00 00 e8 38 2c 00 00 8b 05 e2 c3 32 00 48 8b 15 73 48 66 00 83 c0 01 <89> 05 d2 c3 32 00 89 02 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f RSP: 002b:00007fff360e5230 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000001b2bd20014 RCX: 0000001b2cd20000 RDX: 0000001b2bd20000 RSI: 000000000000035f RDI: ffffffffc260e35f RBP: 0000001b2bd20018 R08: 00000000c260e35f R09: 00000000c260e363 R10: 00007fff360e5370 R11: 0000000000000246 R12: 0000001b2bd2001c R13: 000000000007bbdd R14: 000000000075bf20 R15: 000000000075bf2c Allocated by task 8701: 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] __register_sysctl_table+0xc7/0xef0 fs/proc/proc_sysctl.c:1327 register_net_sysctl+0x29/0x30 net/sysctl_net.c:121 __devinet_sysctl_register+0x17d/0x2c0 net/ipv4/devinet.c:2556 devinet_sysctl_register net/ipv4/devinet.c:2596 [inline] devinet_sysctl_register+0x167/0x220 net/ipv4/devinet.c:2586 inetdev_init+0x22e/0x470 net/ipv4/devinet.c:271 inetdev_event+0xef3/0x1450 net/ipv4/devinet.c:1512 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] register_netdevice+0xa4d/0xff0 net/core/dev.c:8734 __ip_tunnel_create+0x36b/0x530 net/ipv4/ip_tunnel.c:282 ip_tunnel_init_net+0x375/0x9e0 net/ipv4/ip_tunnel.c:1073 vti_init_net+0x2f/0x370 net/ipv4/ip_vti.c:463 ops_init+0xb3/0x410 net/core/net_namespace.c:130 setup_net+0x2d3/0x740 net/core/net_namespace.c:316 copy_net_ns+0x1df/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x444/0x980 kernel/fork.c:2717 __do_sys_unshare kernel/fork.c:2785 [inline] __se_sys_unshare kernel/fork.c:2783 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2783 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8684: 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 tomoyo_supervisor+0x360/0xef0 security/tomoyo/common.c:2147 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x18e/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:670 [inline] tomoyo_find_next_domain+0x1354/0x1f6c security/tomoyo/domain.c:876 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:107 [inline] tomoyo_bprm_check_security+0x124/0x1b0 security/tomoyo/tomoyo.c:97 security_bprm_check+0x63/0xb0 security/security.c:747 search_binary_handler+0x71/0x570 fs/exec.c:1645 exec_binprm fs/exec.c:1701 [inline] __do_execve_file.isra.0+0x1310/0x22f0 fs/exec.c:1821 do_execveat_common fs/exec.c:1868 [inline] do_execve fs/exec.c:1885 [inline] __do_sys_execve fs/exec.c:1961 [inline] __se_sys_execve fs/exec.c:1956 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1956 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 ffff8880a9980c80 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 28 bytes to the right of 2048-byte region [ffff8880a9980c80, ffff8880a9981480) The buggy address belongs to the page: page:ffffea0002a66000 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00026f0d08 ffffea0002871608 ffff8880aa400c40 raw: 0000000000000000 ffff8880a9980400 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9981380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a9981400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a9981480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a9981500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a9981580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================