syz-executor3: vmalloc: allocation failure: 0 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM) CPU: 0 PID: 9962 Comm: syz-executor3 Not tainted 4.9.87-g97d7f1c #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d45ff8f0 ffffffff81d95a19 1ffff1003a8bff21 ffff8801d0333000 ffffffff83ab9520[ 73.604914] BUG: using __this_cpu_read() in preemptible [00000000] code: syz-executor2/9979 caller is __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62 0000000000000001 0000000000400000 ffff8801d45ffa00 ffffffff81451f42 024000c2d45ff940 0000000041b58ab3 ffffffff84195d5d Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] warn_alloc+0x212/0x240 mm/page_alloc.c:3056 [] __vmalloc_node_range+0x3f5/0x5f0 mm/vmalloc.c:1722 [] __vmalloc_node mm/vmalloc.c:1744 [inline] [] __vmalloc_node_flags mm/vmalloc.c:1758 [inline] [] vmalloc+0x5b/0x70 mm/vmalloc.c:1773 [] sel_write_load+0x130/0xfd0 security/selinux/selinuxfs.c:514 [] __vfs_write+0x103/0x680 fs/read_write.c:507 [] vfs_write+0x189/0x530 fs/read_write.c:557 [] SYSC_pwrite64 fs/read_write.c:646 [inline] [] SyS_pwrite64+0x13f/0x170 fs/read_write.c:633 [] do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb CPU: 1 PID: 9979 Comm: syz-executor2 Not tainted 4.9.87-g97d7f1c #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Mem-Info: active_anon:60971 inactive_anon:44 isolated_anon:0 active_file:3589 inactive_file:8491 isolated_file:0 unevictable:0 dirty:124 writeback:0 unstable:0 slab_reclaimable:6144 slab_unreclaimable:59535 mapped:24333 shmem:50 pagetables:665 bounce:0 free:1468048 free_pcp:383 free_cma:0 Node 0 active_anon:243884kB inactive_anon:176kB active_file:14356kB inactive_file:33964kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:97332kB dirty:496kB writeback:0kB shmem:200kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 79872kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no DMA free:15908kB min:160kB low:200kB high:240kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB DMA32 free:2979944kB min:30592kB low:38240kB high:45888kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129292kB managed:2980716kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:772kB local_pcp:48kB free_cma:0kB Normal free:2876340kB min:36824kB low:46028kB high:55232kB active_anon:243884kB inactive_anon:176kB active_file:14356kB inactive_file:33964kB unevictable:0kB writepending:496kB present:4718592kB managed:3585212kB mlocked:0kB slab_reclaimable:24576kB slab_unreclaimable:238140kB kernel_stack:5696kB pagetables:2660kB bounce:0kB free_pcp:760kB local_pcp:492kB free_cma:0kB DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 12129 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965969 pages RAM 0 pages HighMem/MovableOnly 320510 pages reserved ffff8801d003f668 ffffffff81d95a19 0000000000000001 ffffffff83c19000 ffffffff83f45e60 ffff8801d05eb000 0000000000000003 ffff8801d003f6a8 ffffffff81dfd014 ffff8801d003f6c0 ffffffff83f45e60 dffffc0000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] check_preemption_disabled+0x1d4/0x200 lib/smp_processor_id.c:46 [] __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62 [] ipcomp_alloc_tfms net/xfrm/xfrm_ipcomp.c:286 [inline] [] ipcomp_init_state+0x188/0x930 net/xfrm/xfrm_ipcomp.c:363 [] ipcomp6_init_state+0xb5/0x820 net/ipv6/ipcomp6.c:165 [] __xfrm_init_state+0x3e7/0xb30 net/xfrm/xfrm_state.c:2096 [] xfrm_init_state+0x1a/0x20 net/xfrm/xfrm_state.c:2122 [] pfkey_msg2xfrm_state net/key/af_key.c:1289 [inline] [] pfkey_add+0x1fb9/0x3470 net/key/af_key.c:1506 [] pfkey_process+0x68b/0x750 net/key/af_key.c:2834 [] pfkey_sendmsg+0x3a9/0x760 net/key/af_key.c:3678 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1969 [] __sys_sendmsg+0xd6/0x190 net/socket.c:2003 [] SYSC_sendmsg net/socket.c:2014 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2010 [] do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb netlink: 72 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 72 bytes leftover after parsing attributes in process `syz-executor3'. audit: type=1400 audit(1521024318.318:51): avc: denied { write } for pid=10145 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 binder: 10176:10177 BC_REQUEST_DEATH_NOTIFICATION death notification already set audit: type=1400 audit(1521024318.348:52): avc: denied { setopt } for pid=10171 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder: 10176:10193 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 10176:10177 ioctl 40046207 0 returned -16 binder: 10203:10205 unknown command 0 binder: 10203:10205 ioctl c0306201 20004000 returned -22 audit: type=1400 audit(1521024318.938:53): avc: denied { setgid } for pid=10203 comm="syz-executor3" capability=6 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: 10203:10245 unknown command 0 binder: 10203:10245 ioctl c0306201 20004000 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 10203:10205 ioctl 40046207 0 returned -16 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: 10268:10272 ioctl 8912 0 returned -22 binder: 10268:10272 ioctl c0a85322 20000040 returned -22 binder: 10268:10275 ioctl 8912 0 returned -22 binder: 10263:10277 got new transaction with bad transaction stack, transaction 35 has target 10263:0 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=22497 sclass=netlink_xfrm_socket pig=10287 comm=syz-executor1 binder: 10263:10277 transaction failed 29201/-71, size 0-0 line 3037 binder: BINDER_SET_CONTEXT_MGR already set binder: 10263:10292 ioctl 40046207 0 returned -16 binder_alloc: binder_alloc_mmap_handler: 10263 2000c000-2000e000 already mapped failed -16 binder: 10263:10277 got new transaction with bad transaction stack, transaction 35 has target 10263:0 binder: 10263:10277 transaction failed 29201/-71, size 0-0 line 3037 binder_alloc: 10263: binder_alloc_buf, no vma binder: 10263:10292 transaction failed 29189/-3, size 0-0 line 3133 binder: release 10263:10277 transaction 35 out, still active binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 35, target dead SELinux: unrecognized netlink message: protocol=6 nlmsg_type=22497 sclass=netlink_xfrm_socket pig=10294 comm=syz-executor1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. IPVS: Creating netns size=2536 id=17 ================================================================== BUG: KASAN: use-after-free in xfrm6_tunnel_free_spi net/ipv6/xfrm6_tunnel.c:205 [inline] BUG: KASAN: use-after-free in xfrm6_tunnel_destroy+0x52e/0x590 net/ipv6/xfrm6_tunnel.c:300 Read of size 8 at addr ffff8801cc1528f8 by task kworker/1:2/4299 CPU: 1 PID: 4299 Comm: kworker/1:2 Not tainted 4.9.87-g97d7f1c #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events xfrm_state_gc_task ffff8801b0a2fac0 ffffffff81d95a19 ffffea0007305400 ffff8801cc1528f8 0000000000000000 ffff8801cc1528f8 ffff8801d37fc900 ffff8801b0a2faf8 ffffffff8153e333 ffff8801cc1528f8 0000000000000008 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x275/0x360 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] xfrm6_tunnel_free_spi net/ipv6/xfrm6_tunnel.c:205 [inline] [] xfrm6_tunnel_destroy+0x52e/0x590 net/ipv6/xfrm6_tunnel.c:300 [] xfrm_state_gc_destroy net/xfrm/xfrm_state.c:368 [inline] [] xfrm_state_gc_task+0x3a8/0x500 net/xfrm/xfrm_state.c:388 [] process_one_work+0x7e0/0x1610 kernel/workqueue.c:2092 [] worker_thread+0xe0/0x10d0 kernel/workqueue.c:2226 [] kthread+0x26d/0x300 kernel/kthread.c:211 [] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:374 Allocated by task 8992: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] kzalloc include/linux/slab.h:636 [inline] ops_init+0xe8/0x3a0 net/core/net_namespace.c:101 setup_net+0x1b2/0x3e0 net/core/net_namespace.c:291 copy_net_ns+0x189/0x280 net/core/net_namespace.c:389 create_new_namespaces+0x37f/0x730 kernel/nsproxy.c:106 unshare_nsproxy_namespaces+0xae/0x1e0 kernel/nsproxy.c:205 SYSC_unshare kernel/fork.c:2244 [inline] SyS_unshare+0x3dd/0x6f0 kernel/fork.c:2194 do_syscall_64+0x1a4/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb Freed by task 22: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0x103/0x300 mm/slub.c:3878 ops_free net/core/net_namespace.c:126 [inline] ops_free_list.part.8+0x1ff/0x330 net/core/net_namespace.c:148 ops_free_list net/core/net_namespace.c:146 [inline] cleanup_net+0x3bb/0x610 net/core/net_namespace.c:458 process_one_work+0x7e0/0x1610 kernel/workqueue.c:2092 worker_thread+0xe0/0x10d0 kernel/workqueue.c:2226 kthread+0x26d/0x300 kernel/kthread.c:211 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:374 The buggy address belongs to the object at ffff8801cc152100 which belongs to the cache kmalloc-8192 of size 8192 The buggy address is located 2040 bytes inside of 8192-byte region [ffff8801cc152100, ffff8801cc154100) The buggy address belongs to the page: page:ffffea0007305400 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cc152780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cc152800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cc152880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cc152900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cc152980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================