================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff888089c7ab1c by task syz-executor.5/23731 CPU: 0 PID: 23731 Comm: syz-executor.5 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_cpumask+0x8c/0x110 kernel/cgroup/cpuset.c:1017 update_cpumasks_hier+0x68f/0x1620 kernel/cgroup/cpuset.c:1397 update_cpumask kernel/cgroup/cpuset.c:1523 [inline] cpuset_write_resmask+0x132b/0x2030 kernel/cgroup/cpuset.c:2350 cgroup_file_write+0x241/0x790 kernel/cgroup/cgroup.c:3711 kernfs_fop_write+0x2b8/0x480 fs/kernfs/file.c:316 __vfs_write+0x8a/0x110 fs/read_write.c:494 __kernel_write+0x110/0x3b0 fs/read_write.c:515 write_pipe_buf+0x15d/0x1f0 fs/splice.c:794 splice_from_pipe_feed fs/splice.c:500 [inline] __splice_from_pipe+0x38c/0x7d0 fs/splice.c:624 splice_from_pipe+0x108/0x170 fs/splice.c:659 default_file_splice_write+0x3c/0x90 fs/splice.c:806 do_splice_from fs/splice.c:848 [inline] direct_splice_actor+0x123/0x190 fs/splice.c:1020 splice_direct_to_actor+0x366/0x970 fs/splice.c:975 do_splice_direct+0x1da/0x2a0 fs/splice.c:1063 do_sendfile+0x597/0xd00 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x1dd/0x220 fs/read_write.c:1511 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:00007f06f442ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459279 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000004 R11: 0000000000000246 R12: 00007f06f442b6d4 R13: 00000000004c6835 R14: 00000000004db7a8 R15: 00000000ffffffff Allocated by task 3882: 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 16532: 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 skb_free_datagram+0x1b/0x100 net/core/datagram.c:328 netlink_recvmsg+0x6c6/0xf10 net/netlink/af_netlink.c:2001 sock_recvmsg_nosec net/socket.c:877 [inline] sock_recvmsg net/socket.c:894 [inline] sock_recvmsg+0xce/0x110 net/socket.c:890 ___sys_recvmsg+0x271/0x5a0 net/socket.c:2456 __sys_recvmsg+0x102/0x1d0 net/socket.c:2513 __do_sys_recvmsg net/socket.c:2523 [inline] __se_sys_recvmsg net/socket.c:2520 [inline] __x64_sys_recvmsg+0x78/0xb0 net/socket.c:2520 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 ffff888089c7a940 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 476 bytes inside of 1024-byte region [ffff888089c7a940, ffff888089c7ad40) The buggy address belongs to the page: page:ffffea0002271e80 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002448b08 ffffea0002453f88 ffff8880aa400ac0 raw: 0000000000000000 ffff888089c7a040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089c7aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888089c7aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888089c7ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888089c7ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888089c7ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================