================================================================== BUG: KASAN: use-after-free in inet_shutdown+0x2e9/0x370 net/ipv4/af_inet.c:809 Read of size 4 at addr ffff8800ba389100 by task syz-executor5/7312 CPU: 1 PID: 7312 Comm: syz-executor5 Not tainted 4.4.143-g7bbfac1 #77 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 3a277fe5e9de74f3 ffff8801bdcf7ba0 ffffffff81e1002d ffffea0002e8e200 ffff8800ba389100 0000000000000000 ffff8800ba389100 ffff8800b66000d0 ffff8801bdcf7bd8 ffffffff81515ae6 ffff8800ba389100 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x6c/0x216 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report.cold.7+0x175/0x2f7 mm/kasan/report.c:408 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] inet_shutdown+0x2e9/0x370 net/ipv4/af_inet.c:809 [] pppol2tp_session_close+0xa0/0xe0 net/l2tp/l2tp_ppp.c:458 [] l2tp_tunnel_closeall+0x205/0x350 net/l2tp/l2tp_core.c:1274 [] l2tp_udp_encap_destroy+0x8b/0xf0 net/l2tp/l2tp_core.c:1300 [] udpv6_destroy_sock+0xb1/0xd0 net/ipv6/udp.c:1421 [] sk_common_release+0x6d/0x300 net/core/sock.c:2680 [] udp_lib_close+0x15/0x20 include/net/udp.h:190 [] inet_release+0xff/0x1d0 net/ipv4/af_inet.c:435 [] inet6_release+0x50/0x70 net/ipv6/af_inet6.c:424 [] sock_release+0x96/0x1c0 net/socket.c:586 [] sock_close+0x16/0x20 net/socket.c:1037 [] __fput+0x235/0x6f0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:253 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:349 [] int_ret_from_sys_call+0x25/0xa3 Allocated by task 7312: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:616 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xbe/0x2a0 mm/slub.c:2628 [] sock_alloc_inode+0x1d/0x260 net/socket.c:250 [] alloc_inode+0x63/0x180 fs/inode.c:198 [] new_inode_pseudo+0x17/0xe0 fs/inode.c:878 [] sock_alloc+0x41/0x280 net/socket.c:555 [] __sock_create+0x8d/0x5f0 net/socket.c:1141 [] sock_create net/socket.c:1217 [inline] [] SYSC_socket net/socket.c:1247 [inline] [] SyS_socket+0xf0/0x1b0 net/socket.c:1227 [] entry_SYSCALL_64_fastpath+0x22/0x9e Freed by task 7322: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xbe/0x340 mm/slub.c:2881 [] sock_destroy_inode+0x56/0x70 net/socket.c:280 [] destroy_inode+0xc2/0x120 fs/inode.c:255 [] evict+0x322/0x4f0 fs/inode.c:559 [] iput_final fs/inode.c:1477 [inline] [] iput+0x391/0x980 fs/inode.c:1504 [] dentry_iput fs/dcache.c:372 [inline] [] __dentry_kill+0x492/0x5f0 fs/dcache.c:559 [] dentry_kill fs/dcache.c:603 [inline] [] dput.part.26+0x587/0x760 fs/dcache.c:818 [] dput+0x1f/0x30 fs/dcache.c:782 [] __fput+0x401/0x6f0 fs/file_table.c:226 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:253 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:349 [] int_ret_from_sys_call+0x25/0xa3 The buggy address belongs to the object at ffff8800ba389100 which belongs to the cache sock_inode_cache of size 936 The buggy address is located 0 bytes inside of 936-byte region [ffff8800ba389100, ffff8800ba3894a8) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 3833 Comm: kworker/u4:4 Not tainted 4.4.143-g7bbfac1 #77 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) task: ffff8801ca94c800 task.stack: ffff8800a5978000 RIP: 0010:[] [] ___neigh_lookup_noref include/net/neighbour.h:287 [inline] RIP: 0010:[] [] __ipv6_neigh_lookup_noref include/net/ndisc.h:159 [inline] RIP: 0010:[] [] ip6_finish_output2+0x62f/0x1ca0 net/ipv6/ip6_output.c:109 RSP: 0018:ffff8801db207778 EFLAGS: 00010207 RAX: 09ebe8eaa84be9ff RBX: 4f5f4755425f4d56 RCX: 0000000000000000 RDX: 0000000000000100 RSI: ffffffff8342bc71 RDI: 4f5f4755425f4ffe RBP: ffff8801db2078a8 R08: ffff8801ca94d240 R09: 0000000000000000 R10: 0000000000000001 R11: ffff8801ca94c800 R12: ffff8800b910e2a8 R13: dffffc0000000000 R14: ffff8800b910e2b0 R15: ffff8800b3c24b40 FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe75b371db8 CR3: 00000001bead7000 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff8342b825 0000000000000008 ffff8801db207848 0000000000000246 ffff8801bfa00000 0000000000000000 ffffed0017221c55 ffff8800b910e2ac ffff8800b910e2b4 1ffff1003b640efc ffff8801d1101518 ffff8801be270000 Call Trace: [] ip6_finish_output+0x3b8/0x760 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b8/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] NF_HOOK_THRESH.constprop.29+0x11f/0x310 include/linux/netfilter.h:226 [] NF_HOOK include/linux/netfilter.h:249 [inline] [] ndisc_send_skb+0x7e7/0xf20 net/ipv6/ndisc.c:471 [] ndisc_send_rs+0x12a/0x430 net/ipv6/ndisc.c:646 [] addrconf_rs_timer+0x287/0x5b0 net/ipv6/addrconf.c:3527 [] call_timer_fn+0x18c/0x870 kernel/time/timer.c:1185 PANIC: double fault, error_code: 0x0 CPU: 1 PID: 7312 Comm: syz-executor5 Not tainted 4.4.143-g7bbfac1 #77 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d3d33000 task.stack: ffff8801bdcf0000 RIP: 0010:[] [] dump_page_badflags+0x4/0x70 mm/debug.c:84 RSP: 0018:ffff880100000000 EFLAGS: 00010046 RAX: 0000000000040000 RBX: ffffea0002e8e200 RCX: ffffc9000409e000 RDX: 0000000000000000 RSI: ffffffff83aaa220 RDI: ffffea0002e8e200 RBP: ffff880100000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff858ed134 R12: 0000000000000000 R13: ffffffff83aaa220 R14: ffff8800ba389100 R15: ffff8800ba3894b0 FS: 00007f583e501700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8800fffffff8 CR3: 00000001d35c6000 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: Call Trace: Code: e8 3e 48 69 c0 80 06 00 00 f0 48 ff 80 e8 47 9f 84 5b 5d c3 48 89 df e8 fb c8 06 00 eb dd 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 <41> 57 41 56 41 55 49 89 f5 41 54 49 89 d4 53 48 89 fb 48 83 ec