================================================================== BUG: KASAN: use-after-free in css_task_iter_advance+0x49b/0x540 kernel/cgroup/cgroup.c:4507 Read of size 4 at addr ffff8880a64bf49c by task syz-executor.0/29383 CPU: 0 PID: 29383 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 pidlist_array_load+0x181/0xa80 kernel/cgroup/cgroup-v1.c:372 cgroup_pidlist_start+0x37e/0x4c0 kernel/cgroup/cgroup-v1.c:442 cgroup_seqfile_start+0xa4/0xd0 kernel/cgroup/cgroup.c:3752 kernfs_seq_start+0xdc/0x190 fs/kernfs/file.c:118 seq_read+0x2a7/0x1110 fs/seq_file.c:224 kernfs_fop_read+0xed/0x560 fs/kernfs/file.c:252 do_loop_readv_writev fs/read_write.c:714 [inline] do_loop_readv_writev fs/read_write.c:701 [inline] do_iter_read+0x4a4/0x660 fs/read_write.c:935 vfs_readv+0xf0/0x160 fs/read_write.c:997 kernel_readv fs/splice.c:359 [inline] default_file_splice_read+0x475/0x890 fs/splice.c:414 do_splice_to+0x127/0x180 fs/splice.c:877 splice_direct_to_actor+0x2d2/0x970 fs/splice.c:954 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:00007f31fc51ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459279 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 00007f31fc51b6d4 R13: 00000000004c6835 R14: 00000000004db7a8 R15: 00000000ffffffff Allocated by task 28816: 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_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:444 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node+0x131/0x700 mm/slab.c:3573 __alloc_skb+0xd5/0x5e0 net/core/skbuff.c:195 alloc_skb include/linux/skbuff.h:1054 [inline] alloc_skb_with_frags+0x93/0x580 net/core/skbuff.c:5360 sock_alloc_send_pskb+0x72d/0x8a0 net/core/sock.c:2219 packet_alloc_skb net/packet/af_packet.c:2776 [inline] packet_snd net/packet/af_packet.c:2871 [inline] packet_sendmsg+0x17e4/0x5f00 net/packet/af_packet.c:2953 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2287 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2389 __do_sys_sendmmsg net/socket.c:2418 [inline] __se_sys_sendmmsg net/socket.c:2415 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2415 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 28816: 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] kmem_cache_free+0x86/0x320 mm/slab.c:3692 kfree_skbmem net/core/skbuff.c:621 [inline] kfree_skbmem+0xc5/0x150 net/core/skbuff.c:615 __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb net/core/skbuff.c:695 [inline] kfree_skb+0xf0/0x390 net/core/skbuff.c:689 vti_tunnel_xmit+0x635/0x17a0 net/ipv4/ip_vti.c:283 __netdev_start_xmit include/linux/netdevice.h:4406 [inline] netdev_start_xmit include/linux/netdevice.h:4420 [inline] xmit_one net/core/dev.c:3288 [inline] dev_hard_start_xmit+0x18a/0x950 net/core/dev.c:3304 __dev_queue_xmit+0x2a8e/0x36b0 net/core/dev.c:3877 dev_queue_xmit+0x18/0x20 net/core/dev.c:3910 packet_snd net/packet/af_packet.c:2928 [inline] packet_sendmsg+0x22a1/0x5f00 net/packet/af_packet.c:2953 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2287 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2389 __do_sys_sendmmsg net/socket.c:2418 [inline] __se_sys_sendmmsg net/socket.c:2415 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2415 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 ffff8880a64bf3c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 220 bytes inside of 224-byte region [ffff8880a64bf3c0, ffff8880a64bf4a0) The buggy address belongs to the page: page:ffffea0002992fc0 refcount:1 mapcount:0 mapping:ffff88821b6f6540 index:0xffff8880a64bfb40 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000245a548 ffffea0002543f48 ffff88821b6f6540 raw: ffff8880a64bfb40 ffff8880a64bf000 000000010000000a 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a64bf380: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a64bf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a64bf480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a64bf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a64bf580: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================