================================================================== BUG: KASAN: slab-out-of-bounds in ip6_tnl_xmit2+0x1f95/0x2320 net/ipv6/ip6_tunnel.c:987 Read of size 16 at addr ffff8801d8394bb0 by task syz-executor.3/14098 CPU: 1 PID: 14098 Comm: syz-executor.3 Not tainted 4.4.174+ #17 0000000000000000 844af686f8f3d863 ffff8800a46fec50 ffffffff81aad1a1 0000000000000000 ffffea000760e500 ffff8801d8394bb0 0000000000000010 ffff8801d8394900 ffff8800a46fec88 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_load_n_noabort+0xf/0x20 mm/kasan/report.c:439 [] ip6_tnl_xmit2+0x1f95/0x2320 net/ipv6/ip6_tunnel.c:987 [] ip4ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1134 [inline] [] ip6_tnl_xmit+0xa09/0xe00 net/ipv6/ip6_tunnel.c:1212 [] __netdev_start_xmit include/linux/netdevice.h:3750 [inline] [] netdev_start_xmit include/linux/netdevice.h:3759 [inline] [] xmit_one net/core/dev.c:2781 [inline] [] dev_hard_start_xmit+0x7c1/0x11e0 net/core/dev.c:2797 [] __dev_queue_xmit+0x164b/0x1bb0 net/core/dev.c:3229 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_direct_output+0x16/0x20 net/core/neighbour.c:1369 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip_finish_output2+0x6a2/0x1280 net/ipv4/ip_output.c:213 [] ip_finish_output+0x8b2/0xc60 net/ipv4/ip_output.c:288 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip_output+0x227/0x4c0 net/ipv4/ip_output.c:362 [] dst_output include/net/dst.h:498 [inline] [] ip_local_out+0x9c/0x180 net/ipv4/ip_output.c:119 [] ip_send_skb+0x3e/0xc0 net/ipv4/ip_output.c:1453 [] udp_send_skb+0x4fd/0xc70 net/ipv4/udp.c:842 [] udp_sendmsg+0x16cf/0x1c60 net/ipv4/udp.c:1072 [] udpv6_sendmsg+0x12f2/0x24f0 net/ipv6/udp.c:1173 [] 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 14098: [] 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 [] __kmalloc+0x141/0x330 mm/slub.c:3613 [] kmalloc include/linux/slab.h:481 [inline] [] kzalloc include/linux/slab.h:620 [inline] [] neigh_alloc net/core/neighbour.c:285 [inline] [] __neigh_create+0x1d6/0x1b30 net/core/neighbour.c:457 [] neigh_create include/net/neighbour.h:313 [inline] [] ipv4_neigh_lookup+0x52e/0x6e0 net/ipv4/route.c:464 [] dst_neigh_lookup include/net/dst.h:466 [inline] [] ip6_tnl_xmit2+0x27b/0x2320 net/ipv6/ip6_tunnel.c:982 [] ip4ip6_tnl_xmit net/ipv6/ip6_tunnel.c:1134 [inline] [] ip6_tnl_xmit+0xa09/0xe00 net/ipv6/ip6_tunnel.c:1212 [] __netdev_start_xmit include/linux/netdevice.h:3750 [inline] [] netdev_start_xmit include/linux/netdevice.h:3759 [inline] [] xmit_one net/core/dev.c:2781 [inline] [] dev_hard_start_xmit+0x7c1/0x11e0 net/core/dev.c:2797 [] __dev_queue_xmit+0x164b/0x1bb0 net/core/dev.c:3229 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:3263 [] neigh_direct_output+0x16/0x20 net/core/neighbour.c:1369 [] dst_neigh_output include/net/dst.h:461 [inline] [] ip_finish_output2+0x6a2/0x1280 net/ipv4/ip_output.c:213 [] ip_finish_output+0x8b2/0xc60 net/ipv4/ip_output.c:288 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip_output+0x227/0x4c0 net/ipv4/ip_output.c:362 [] dst_output include/net/dst.h:498 [inline] [] ip_local_out+0x9c/0x180 net/ipv4/ip_output.c:119 [] ip_send_skb+0x3e/0xc0 net/ipv4/ip_output.c:1453 [] udp_send_skb+0x4fd/0xc70 net/ipv4/udp.c:842 [] udp_sendmsg+0x16cf/0x1c60 net/ipv4/udp.c:1072 [] udpv6_sendmsg+0x12f2/0x24f0 net/ipv6/udp.c:1173 [] 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 2119: [] 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] [] kfree+0xf4/0x310 mm/slub.c:3749 [] kvfree+0x4d/0x60 mm/util.c:323 [] xt_free_table_info+0x14b/0x1b0 net/netfilter/x_tables.c:1019 [] translate_compat_table+0x13b5/0x1790 net/ipv6/netfilter/ip6_tables.c:1651 [] compat_do_replace.isra.0+0x259/0x3e0 net/ipv6/netfilter/ip6_tables.c:1701 [] compat_do_ip6t_set_ctl+0x105/0x150 net/ipv6/netfilter/ip6_tables.c:1732 [] compat_nf_sockopt net/netfilter/nf_sockopt.c:143 [inline] [] compat_nf_setsockopt+0x8b/0x130 net/netfilter/nf_sockopt.c:155 [] compat_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:940 [inline] [] compat_ipv6_setsockopt+0x15a/0x1d0 net/ipv6/ipv6_sockglue.c:916 [] inet_csk_compat_setsockopt+0x99/0x120 net/ipv4/inet_connection_sock.c:914 [] compat_tcp_setsockopt+0x40/0x70 net/ipv4/tcp.c:2654 [] compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:2674 [] C_SYSC_setsockopt net/compat.c:385 [inline] [] compat_SyS_setsockopt+0x15c/0x720 net/compat.c:368 [] C_SYSC_socketcall net/compat.c:839 [inline] [] compat_SyS_socketcall+0x4f7/0x630 net/compat.c:774 [] 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 The buggy address belongs to the object at ffff8801d8394900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 688 bytes inside of 1024-byte region [ffff8801d8394900, ffff8801d8394d00) 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 Modules linked in: CPU: 0 PID: 14075 Comm: syz-executor.3 Not tainted 4.4.174+ #17 task: ffff8801d1a15f00 task.stack: ffff8800b8a60000 RIP: 0010:[] [] lookup_object lib/debugobjects.c:120 [inline] RIP: 0010:[] [] debug_object_deactivate+0x16f/0x360 lib/debugobjects.c:468 RSP: 0018:ffff8801db607d00 EFLAGS: 00010803 RAX: 1ffffffff08110c0 RBX: 0000000000000003 RCX: 000000000000e0de RDX: 14541d1cf1298164 RSI: ffffffff82eacda0 RDI: a2a0e8e7894c0b27 RBP: ffff8801db607de8 R08: 0000000000000003 R09: ffffffff84088608 R10: 0000000000000096 R11: 0000000000000000 R12: a2a0e8e7894c0b0f R13: dffffc0000000000 R14: 1ffff1003b6c0fa4 R15: ffffffff8315be08 FS: 0000000000000000(0000) GS:ffff8801db600000(0063) knlGS:00000000f55d5b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000002000a01c CR3: 00000001d97a3000 CR4: 00000000001606b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff88021fffd008 0000000000000006 ffffffff84088608 ffffffff82eacda0 0000000041b58ab3 ffffffff82c76921 ffffffff81b0c500 0000000000000000 0000000000000000 ffff8801db607dc8 0000000000000046 0000000000000000 Call Trace: [] debug_timer_deactivate kernel/time/timer.c:618 [inline] [] debug_deactivate kernel/time/timer.c:670 [inline] [] detach_timer kernel/time/timer.c:716 [inline] [] detach_expired_timer kernel/time/timer.c:727 [inline] [] __run_timers kernel/time/timer.c:1253 [inline] [] run_timer_softirq+0x3af/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: 48 c1 ea 03 42 80 3c 2a 00 0f 85 8e 01 00 00 4d 8b 24 24 4d 85 e4 0f 84 e9 00 00 00 49 8d 7c 24 18 83 c3 01 48 89 fa 48 c1 ea 03 <42> 80 3c 2a 00 0f 85 3f 01 00 00 4d 3b 7c 24 18 75 c0 49 8d 7c RIP [] lookup_object lib/debugobjects.c:120 [inline] RIP [] debug_object_deactivate+0x16f/0x360 lib/debugobjects.c:468 RSP ---[ end trace 6c4737a0bd267964 ]---