================================================================== BUG: KASAN: use-after-free in ip6_dst_idev include/net/ip6_fib.h:141 [inline] BUG: KASAN: use-after-free in ip6_xmit+0x177c/0x1a00 net/ipv6/ip6_output.c:237 Read of size 8 at addr ffff8800b7b133d8 by task syz-executor0/3704 CPU: 1 PID: 3704 Comm: syz-executor0 Not tainted 4.4.151-g3a2ec58 #86 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 95317199ec8d6069 ffff8801c9fbf5c8 ffffffff81e15eed ffffea0002dec4c0 ffff8800b7b133d8 0000000000000000 ffff8800b7b133d8 0000000000001000 ffff8801c9fbf600 ffffffff8151b390 ffff8800b7b133d8 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_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] ip6_dst_idev include/net/ip6_fib.h:141 [inline] [] ip6_xmit+0x177c/0x1a00 net/ipv6/ip6_output.c:237 [] inet6_csk_xmit+0x245/0x490 net/ipv6/inet6_connection_sock.c:176 [] l2tp_xmit_core net/l2tp/l2tp_core.c:1084 [inline] [] l2tp_xmit_skb+0xb9c/0xe80 net/l2tp/l2tp_core.c:1179 [] pppol2tp_sendmsg+0x4e0/0x7d0 net/l2tp/l2tp_ppp.c:355 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xcc/0x110 net/socket.c:648 [] ___sys_sendmsg+0x441/0x880 net/socket.c:1975 [] __sys_sendmmsg+0x12e/0x2e0 net/socket.c:2060 [] SYSC_sendmmsg net/socket.c:2090 [inline] [] SyS_sendmmsg+0x35/0x60 net/socket.c:2085 [] entry_SYSCALL_64_fastpath+0x22/0x9e Allocated by task 2680: [] 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 [] dst_alloc+0xb5/0x1a0 net/core/dst.c:210 [] rt_dst_alloc+0x78/0x430 net/ipv4/route.c:1478 [] __mkroute_output net/ipv4/route.c:2132 [inline] [] __ip_route_output_key_hash+0x9ac/0x2380 net/ipv4/route.c:2344 [] __ip_route_output_key include/net/route.h:124 [inline] [] ip_route_output_flow+0x29/0xa0 net/ipv4/route.c:2431 [] ip_route_connect include/net/route.h:304 [inline] [] __ip4_datagram_connect+0x663/0xfe0 net/ipv4/datagram.c:51 [] __ip6_datagram_connect+0x1280/0x1960 net/ipv6/datagram.c:105 [] ip6_datagram_connect+0x2f/0x50 net/ipv6/datagram.c:223 [] inet_dgram_connect+0x117/0x200 net/ipv4/af_inet.c:550 [] SYSC_connect+0x1b8/0x300 net/socket.c:1570 [] SyS_connect+0x24/0x30 net/socket.c:1551 [] entry_SYSCALL_64_fastpath+0x22/0x9e Freed by task 3: [] 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 [] dst_destroy.part.6+0x1f5/0x330 net/core/dst.c:270 [] dst_destroy net/core/dst.c:252 [inline] [] dst_destroy_rcu+0x15/0x40 net/core/dst.c:295 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2705 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:2973 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:2940 [inline] [] rcu_process_callbacks+0x927/0x1440 kernel/rcu/tree.c:2957 [] __do_softirq+0x22c/0xa1a kernel/softirq.c:273 The buggy address belongs to the object at ffff8800b7b133c0 which belongs to the cache ip_dst_cache of size 208 The buggy address is located 24 bytes inside of 208-byte region [ffff8800b7b133c0, ffff8800b7b13490) The buggy address belongs to the page: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.151-g3a2ec58 #86 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 6ec23e48541b6f2c ffff8801db207aa0 ffffffff81e15eed ffffffff85380fa0 0000000000000000 ffff8801c9f3d040 0000000000000000 0000000000000000 ffff8801db207c50 ffffffff812367dc 0000000000000003 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] register_lock_class kernel/locking/lockdep.c:762 [inline] [] __lock_acquire+0x46dc/0x5270 kernel/locking/lockdep.c:3101 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:112 [inline] [] _raw_spin_lock_irqsave+0x4e/0x70 kernel/locking/spinlock.c:159 [] try_to_wake_up+0x2c/0xf00 kernel/sched/core.c:1974 [] wake_up_process+0x15/0x20 kernel/sched/core.c:2142 [] hrtimer_wakeup+0x48/0x60 kernel/time/hrtimer.c:1482 [] __run_hrtimer kernel/time/hrtimer.c:1261 [inline] [] __hrtimer_run_queues+0x3ad/0x1000 kernel/time/hrtimer.c:1325 [] hrtimer_interrupt+0x1b1/0x430 kernel/time/hrtimer.c:1359 [] local_apic_timer_interrupt+0x74/0xa0 arch/x86/kernel/apic/apic.c:901 [] smp_apic_timer_interrupt+0x7c/0xa0 arch/x86/kernel/apic/apic.c:925 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:741 [] ? native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:51 [] arch_safe_halt arch/x86/include/asm/paravirt.h:117 [inline] [] default_idle+0x55/0x3c0 arch/x86/kernel/process.c:432 [] arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:423 [] default_idle_call+0x57/0x70 kernel/sched/idle.c:93 [] cpuidle_idle_call kernel/sched/idle.c:157 [inline] [] cpu_idle_loop kernel/sched/idle.c:253 [inline] [] cpu_startup_entry+0x6af/0x780 kernel/sched/idle.c:301 [] rest_init+0x188/0x18e init/main.c:410 [] start_kernel+0x6b3/0x6e7 init/main.c:682 [] x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:196 [] x86_64_start_kernel+0x13f/0x162 arch/x86/kernel/head64.c:185 PANIC: double fault, error_code: 0x0 CPU: 1 PID: 3704 Comm: syz-executor0 Not tainted 4.4.151-g3a2ec58 #86 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800a2a14800 task.stack: ffff8801c9fb8000 RIP: 0010:[] [] dump_page_badflags+0x1a/0x70 mm/debug.c:84 RSP: 0018:ffff8800fffffff8 EFLAGS: 00010092 RAX: 0000000000040000 RBX: ffffea0002dec4c0 RCX: ffffc90020260000 RDX: 0000000000000000 RSI: ffffffff83aaae60 RDI: ffffea0002dec4c0 RBP: ffff880100000028 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff858f0274 R12: 0000000000000000 R13: ffffffff83aaae60 R14: ffff8800b7b133c0 R15: ffff8800b7b13490 FS: 00007fac9348a700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8800ffffffe8 CR3: 00000001cb6ac000 CR4: 00000000001606f0 Stack: BUG: unable to handle kernel paging request at ffff8800fffffff8 IP: [] show_stack_log_lvl.cold.1+0x73/0x12e arch/x86/kernel/dumpstack_64.c:287 PGD 6330067 PUD 0 Thread overran stack, or stack corrupted Oops: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 3704 Comm: syz-executor0 Not tainted 4.4.151-g3a2ec58 #86 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800a2a14800 task.stack: ffff8801c9fb8000 RIP: 0010:[] [] show_stack_log_lvl.cold.1+0x73/0x12e arch/x86/kernel/dumpstack_64.c:287 RSP: 0018:ffff8801db30ce68 EFLAGS: 00010046 RAX: ffff880100000000 RBX: 0000000000000000 RCX: ffff8801db307fc0 RDX: ffff8800fffffff8 RSI: ffffffff81e75a5b RDI: ffffffff83c15480 RBP: ffff8801db30cec0 R08: ffff8801db2fffc0 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff858f0254 R12: ffffffff841dc914 R13: ffff8801db30cf58 R14: 0000000000000000 R15: ffffffff841dc902 FS: 00007fac9348a700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8800fffffff8 CR3: 00000001cb6ac000 CR4: 00000000001606f0 Stack: ffffffff841dc914 ffff8800a2a14800 95317199ec8d6069 0000000000000001 ffff880100000000 ffff8800fffffff8 ffff8801db30cf58 ffff8800fffffff8 0000000000000040 ffff8800fffffff8 ffff8800b7b13490 ffff8801db30cf00 Call Trace: <#DF> [] show_regs.cold.2+0xa0/0x124 arch/x86/kernel/dumpstack_64.c:320 [] df_debug+0x1c/0x2d arch/x86/kernel/doublefault.c:80 [] do_double_fault+0x113/0x230 arch/x86/kernel/traps.c:351 [] double_fault+0x2d/0x40 arch/x86/entry/entry_64.S:886 <> Code: b3 90 2f 00 48 8b 55 c8 48 8b 4d c0 4c 8b 45 b8 44 8b 4d b4 48 8d 42 08 41 f6 c1 03 48 89 45 c8 75 6a 45 85 c9 0f 85 8a 00 00 00 <48> 8b 12 4c 89 e6 48 c7 c7 0a c9 1d 84 44 89 4d b4 4c 89 45 b8 RIP [] show_stack_log_lvl.cold.1+0x73/0x12e arch/x86/kernel/dumpstack_64.c:287 RSP CR2: ffff8800fffffff8 ---[ end trace 27558078b180b722 ]---