================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:218 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:26 [inline] BUG: KASAN: use-after-free in __atomic_add_unless arch/x86/include/asm/atomic.h:211 [inline] BUG: KASAN: use-after-free in atomic_add_unless include/linux/atomic.h:437 [inline] BUG: KASAN: use-after-free in sk_dst_get include/net/sock.h:1745 [inline] BUG: KASAN: use-after-free in sk_dst_check+0x347/0x380 net/core/sock.c:546 Read of size 4 at addr ffff8801d0a8abc0 by task syz-executor.0/20747 CPU: 0 PID: 20747 Comm: syz-executor.0 Not tainted 4.4.174+ #17 0000000000000000 d729f50094290166 ffff8801cf1e7698 ffffffff81aad1a1 0000000000000000 ffffea000742a280 ffff8801d0a8abc0 0000000000000004 0000000000000000 ffff8801cf1e76d0 ffffffff81490120 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_address_description+0x6f/0x21b mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report mm/kasan/report.c:408 [inline] [] kasan_report.cold+0x8c/0x2be mm/kasan/report.c:393 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] __read_once_size include/linux/compiler.h:218 [inline] [] atomic_read arch/x86/include/asm/atomic.h:26 [inline] [] __atomic_add_unless arch/x86/include/asm/atomic.h:211 [inline] [] atomic_add_unless include/linux/atomic.h:437 [inline] [] sk_dst_get include/net/sock.h:1745 [inline] [] sk_dst_check+0x347/0x380 net/core/sock.c:546 [] udp_sendmsg+0x114f/0x1c60 net/ipv4/udp.c:1019 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x369/0x890 net/socket.c:1975 [] __sys_sendmmsg+0x1d6/0x2e0 net/socket.c:2053 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a Allocated by task 20747: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc.part.0+0x62/0xf0 mm/kasan/kasan.c:616 [] kasan_kmalloc+0xb7/0xd0 mm/kasan/kasan.c:601 [] kasan_slab_alloc+0xf/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+0xdc/0x2c0 mm/slub.c:2628 [] dst_alloc+0xf3/0x1b0 net/core/dst.c:210 [] ipv4_blackhole_route+0x30/0x720 net/ipv4/route.c:2396 [] make_blackhole net/xfrm/xfrm_policy.c:2161 [inline] [] xfrm_lookup_route net/xfrm/xfrm_policy.c:2331 [inline] [] xfrm_lookup_route+0xf4/0x140 net/xfrm/xfrm_policy.c:2322 [] ip_route_output_flow+0x93/0xa0 net/ipv4/route.c:2437 [] udp_sendmsg+0x1537/0x1c60 net/ipv4/udp.c:1040 [] inet_sendmsg+0x202/0x4d0 net/ipv4/af_inet.c:755 [] sock_sendmsg_nosec net/socket.c:638 [inline] [] sock_sendmsg+0xbe/0x110 net/socket.c:648 [] ___sys_sendmsg+0x369/0x890 net/socket.c:1975 [] __sys_sendmmsg+0x1d6/0x2e0 net/socket.c:2053 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a Freed by task 15: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack mm/kasan/kasan.c:512 [inline] [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0xb0/0x190 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/0x350 mm/slub.c:2881 [] dst_destroy+0x26f/0x330 net/core/dst.c:270 [] dst_gc_task+0x1be/0x530 net/core/dst.c:89 [] process_one_work+0x825/0x1720 kernel/workqueue.c:2064 [] worker_thread+0x4e4/0xf50 kernel/workqueue.c:2196 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 The buggy address belongs to the object at ffff8801d0a8ab40 which belongs to the cache ip_dst_cache of size 208 The buggy address is located 128 bytes inside of 208-byte region [ffff8801d0a8ab40, ffff8801d0a8ac10) 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: 1 PID: 20731 Comm: syz-executor.0 Not tainted 4.4.174+ #17 0000000000000000 b287aa100e9e6338 ffff8801db707b00 ffffffff81aad1a1 ffffffff83a6fda0 ffff8800b280af80 0000000000000000 0000000000000001 0000000000000000 ffff8801db707c90 ffffffff8120393e ffff8800b280b8d8 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] register_lock_class kernel/locking/lockdep.c:762 [inline] [] __lock_acquire+0x438e/0x4f50 kernel/locking/lockdep.c:3101 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] call_timer_fn+0x129/0x850 kernel/time/timer.c:1182 [] __run_timers kernel/time/timer.c:1261 [inline] [] run_timer_softirq+0x51f/0xb70 kernel/time/timer.c:1444 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] invoke_softirq kernel/softirq.c:350 [inline] [] irq_exit+0x10a/0x150 kernel/softirq.c:391 [] exiting_irq arch/x86/include/asm/apic.h:652 [inline] [] smp_apic_timer_interrupt+0x7e/0xb0 arch/x86/kernel/apic/apic.c:926 [] apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:768 [] ? rep_nop arch/x86/include/asm/processor.h:568 [inline] [] ? cpu_relax arch/x86/include/asm/processor.h:573 [inline] [] ? csd_lock_wait kernel/smp.c:111 [inline] [] ? smp_call_function_single+0x13b/0x3b0 kernel/smp.c:303 [] smp_call_function_many+0x5c0/0x730 kernel/smp.c:435 [] native_flush_tlb_others+0x110/0x710 arch/x86/mm/tlb.c:325 [] flush_tlb_others arch/x86/include/asm/paravirt.h:338 [inline] [] flush_tlb_mm_range+0x10e/0x550 arch/x86/mm/tlb.c:391 [] flush_tlb_page arch/x86/include/asm/tlbflush.h:300 [inline] [] ptep_clear_flush+0xe7/0x120 mm/pgtable-generic.c:80 [] wp_page_copy.isra.0+0x6e3/0xc70 mm/memory.c:2202 [] do_wp_page+0x23a/0x1340 mm/memory.c:2441 [] handle_pte_fault mm/memory.c:3362 [inline] [] __handle_mm_fault mm/memory.c:3474 [inline] [] handle_mm_fault+0x1614/0x3140 mm/memory.c:3503 [] __do_page_fault+0x28e/0x7f0 arch/x86/mm/fault.c:1243 [] do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1306 [] page_fault+0x25/0x30 arch/x86/entry/entry_64.S:1064 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a kernel tried to execute NX-protected page - exploit attempt? (uid: 0) BUG: unable to handle kernel paging request at ffff8801cf094858 IP: [] 0xffff8801cf094858 PGD 49a2067 PUD 80000001c00001e3 Oops: 0011 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 20731 Comm: syz-executor.0 Not tainted 4.4.174+ #17 task: ffff8800b280af80 task.stack: ffff8801d4598000 RIP: 0010:[] [] 0xffff8801cf094858 RSP: 0018:ffff8801db707d18 EFLAGS: 00010206 RAX: ffff8801cf094858 RBX: 1ffff1003b6e0fa8 RCX: 1ffffffff05f7178 RDX: 0000000000000100 RSI: ffffffff812582ce RDI: ffffffff8142ac16 RBP: ffff8801db707de8 R08: 0000000000000033 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff83fdf181 R12: ffff8801db707d60 R13: ffff8801cf094800 R14: 0000000000000103 R15: ffffffff8142ac16 FS: 0000000000000000(0000) GS:ffff8801db700000(0063) knlGS:00000000f55f5b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: ffff8801cf094858 CR3: 00000001d07da000 CR4: 00000000001606b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff812582dd ffffffff8125822e ffffffff82c76921 0000000000000001 ffff8801cf094858 0000000041b58ab3 ffffffff82c54583 ffffffff81258150 ffff8801db707da0 ffff8801d0a8ab40 0000000000000000 0000000000000000 Call Trace: [] __run_timers kernel/time/timer.c:1261 [inline] [] run_timer_softirq+0x51f/0xb70 kernel/time/timer.c:1444 [] __do_softirq+0x226/0xa3f kernel/softirq.c:273 [] invoke_softirq kernel/softirq.c:350 [inline] [] irq_exit+0x10a/0x150 kernel/softirq.c:391 [] exiting_irq arch/x86/include/asm/apic.h:652 [inline] [] smp_apic_timer_interrupt+0x7e/0xb0 arch/x86/kernel/apic/apic.c:926 [] apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:768 [] smp_call_function_many+0x5c0/0x730 kernel/smp.c:435 [] native_flush_tlb_others+0x110/0x710 arch/x86/mm/tlb.c:325 [] flush_tlb_others arch/x86/include/asm/paravirt.h:338 [inline] [] flush_tlb_mm_range+0x10e/0x550 arch/x86/mm/tlb.c:391 [] flush_tlb_page arch/x86/include/asm/tlbflush.h:300 [inline] [] ptep_clear_flush+0xe7/0x120 mm/pgtable-generic.c:80 [] wp_page_copy.isra.0+0x6e3/0xc70 mm/memory.c:2202 [] do_wp_page+0x23a/0x1340 mm/memory.c:2441 [] handle_pte_fault mm/memory.c:3362 [inline] [] __handle_mm_fault mm/memory.c:3474 [inline] [] handle_mm_fault+0x1614/0x3140 mm/memory.c:3503 [] __do_page_fault+0x28e/0x7f0 arch/x86/mm/fault.c:1243 [] do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1306 [] page_fault+0x25/0x30 arch/x86/entry/entry_64.S:1064 [] C_SYSC_sendmmsg net/compat.c:731 [inline] [] compat_SyS_sendmmsg+0x32/0x40 net/compat.c:728 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a Code: ff ff ff 00 00 00 00 00 00 00 00 80 a2 42 07 00 ea ff ff e0 1b 89 82 ff ff ff ff 10 ac a8 d0 01 88 ff ff 40 ab a8 d0 01 88 ff ff <78> 48 09 cf 01 88 ff ff 50 ac 42 81 ff ff ff ff 80 a2 42 07 00 RIP [] 0xffff8801cf094858 RSP CR2: ffff8801cf094858 ---[ end trace 266a8de01c1ca007 ]---