================================================================== BUG: KASAN: slab-out-of-bounds in ip6_tnl_xmit2+0x1f95/0x2320 net/ipv6/ip6_tunnel.c:987 Read of size 16 at addr ffff8801da77a230 by task syz-executor.5/4912 CPU: 0 PID: 4912 Comm: syz-executor.5 Not tainted 4.4.174+ #17 0000000000000000 be332f5d6bc2adf2 ffff8800a04cf230 ffffffff81aad1a1 0000000000000000 ffffea000769de00 ffff8801da77a230 0000000000000010 ffff8801da779f80 ffff8800a04cf268 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_queue_xmit+0x89c/0x1ab0 net/ipv4/ip_output.c:461 [] __tcp_transmit_skb+0x1904/0x2cf0 net/ipv4/tcp_output.c:1034 [] tcp_transmit_skb net/ipv4/tcp_output.c:1047 [inline] [] tcp_write_xmit+0x624/0x4570 net/ipv4/tcp_output.c:2137 [] __tcp_push_pending_frames+0xab/0x2b0 net/ipv4/tcp_output.c:2323 [] tcp_send_fin+0x15b/0xa90 net/ipv4/tcp_output.c:2899 [] tcp_shutdown net/ipv4/tcp.c:2008 [inline] [] tcp_shutdown+0xe2/0x110 net/ipv4/tcp.c:1993 [] inet_shutdown+0x17b/0x360 net/ipv4/af_inet.c:825 [] SYSC_shutdown net/socket.c:1832 [inline] [] SyS_shutdown+0xfb/0x1a0 net/socket.c:1823 [] 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 4912: [] 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_queue_xmit+0x89c/0x1ab0 net/ipv4/ip_output.c:461 [] __tcp_transmit_skb+0x1904/0x2cf0 net/ipv4/tcp_output.c:1034 [] tcp_transmit_skb net/ipv4/tcp_output.c:1047 [inline] [] tcp_write_xmit+0x624/0x4570 net/ipv4/tcp_output.c:2137 [] __tcp_push_pending_frames+0xab/0x2b0 net/ipv4/tcp_output.c:2323 [] tcp_send_fin+0x15b/0xa90 net/ipv4/tcp_output.c:2899 [] tcp_shutdown net/ipv4/tcp.c:2008 [inline] [] tcp_shutdown+0xe2/0x110 net/ipv4/tcp.c:1993 [] inet_shutdown+0x17b/0x360 net/ipv4/af_inet.c:825 [] SYSC_shutdown net/socket.c:1832 [inline] [] SyS_shutdown+0xfb/0x1a0 net/socket.c:1823 [] 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 3850: [] 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 [] skb_free_head net/core/skbuff.c:571 [inline] [] skb_release_data+0x2e6/0x380 net/core/skbuff.c:602 [] skb_release_all+0x4d/0x60 net/core/skbuff.c:661 [] __kfree_skb net/core/skbuff.c:675 [inline] [] kfree_skb+0xf7/0x400 net/core/skbuff.c:696 [] ipip6_tunnel_xmit net/ipv6/sit.c:998 [inline] [] sit_tunnel_xmit+0xfdb/0x2610 net/ipv6/sit.c:1030 [] __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] [] ip6_finish_output2+0x9c7/0x1dc0 net/ipv6/ip6_output.c:113 [] ip6_finish_output+0x2f3/0x750 net/ipv6/ip6_output.c:131 [] NF_HOOK_COND include/linux/netfilter.h:240 [inline] [] ip6_output+0x1b4/0x520 net/ipv6/ip6_output.c:145 [] dst_output include/net/dst.h:498 [inline] [] ip6_local_out+0x9c/0x180 net/ipv6/output_core.c:169 [] ip6_send_skb+0xa2/0x340 net/ipv6/ip6_output.c:1725 [] udp_v6_send_skb+0x438/0xe90 net/ipv6/udp.c:1066 [] udpv6_sendmsg+0x1e3d/0x24f0 net/ipv6/udp.c:1330 [] 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 The buggy address belongs to the object at ffff8801da779f80 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 688 bytes inside of 1024-byte region [ffff8801da779f80, ffff8801da77a380) The buggy address belongs to the page: BUG: unable to handle kernel paging request at fffffffc857e4dc0 IP: [] cpuacct_charge+0x14e/0x360 kernel/sched/cpuacct.c:247 PGD 2e0d067 PUD 0 Oops: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 4899 Comm: syz-executor.5 Not tainted 4.4.174+ #17 task: ffff8801d96d97c0 task.stack: ffff8800bba90000 RIP: 0010:[] [] cpuacct_charge+0x14e/0x360 kernel/sched/cpuacct.c:247 RSP: 0018:ffff8801db707988 EFLAGS: 00010046 RAX: 1ffffffff05d2a33 RBX: 00000000000181a8 RCX: fffffffc857e4dc0 RDX: fffffbff90afc9b8 RSI: ffffffff81b0abec RDI: ffffffff82e95198 RBP: ffff8801db7079c8 R08: 0000000000000007 R09: ffff8801d96da1c0 R10: ffffffff82836880 R11: 0000000000000000 R12: ffffffff82e950c0 R13: dffffc0000000000 R14: 00000000544a8f4e R15: ffffffffa04c8030 FS: 0000000000000000(0000) GS:ffff8801db700000(0063) knlGS:00000000f552eb40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: fffffffc857e4dc0 CR3: 00000000a2c45000 CR4: 00000000001606b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff811f4630 0000000000000046 0000000000000003 ffff8801cf54afe0 ffff8801cf54af80 00000000544a8f4e ffff8801cf54b030 0000000000000000 ffff8801db707a10 ffffffff8117c4a3 0000000000000001 ffff880100000000 Call Trace: [] update_curr+0x2c3/0x6e0 kernel/sched/fair.c:882 [] enqueue_entity kernel/sched/fair.c:3512 [inline] [] enqueue_task_fair+0x10f/0xb6c0 kernel/sched/fair.c:4711 [] enqueue_task kernel/sched/core.c:858 [inline] [] activate_task+0x154/0x280 kernel/sched/core.c:874 [] ttwu_activate kernel/sched/core.c:1736 [inline] [] ttwu_do_activate.constprop.0+0xbe/0x1e0 kernel/sched/core.c:1789 [] ttwu_queue kernel/sched/core.c:1934 [inline] [] try_to_wake_up+0x6d1/0x1110 kernel/sched/core.c:2068 [] wake_up_process+0x15/0x20 kernel/sched/core.c:2142 [] wake_up_worker kernel/workqueue.c:846 [inline] [] insert_work+0x21e/0x320 kernel/workqueue.c:1318 [] __queue_work+0x3e3/0xec0 kernel/workqueue.c:1433 [] delayed_work_timer_fn+0x6e/0x90 kernel/workqueue.c:1472 [] call_timer_fn+0x18d/0x850 kernel/time/timer.c:1185 [] __run_timers kernel/time/timer.c:1257 [inline] [] run_timer_softirq+0x2d4/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 [] pipe_read+0x274/0x860 fs/pipe.c:270 [] new_sync_read fs/read_write.c:424 [inline] [] __vfs_read+0x2e5/0x3c0 fs/read_write.c:436 [] vfs_read+0x134/0x360 fs/read_write.c:456 [] SYSC_read fs/read_write.c:571 [inline] [] SyS_read+0xdc/0x1c0 fs/read_write.c:564 [] 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: 49 8d bc 24 d8 00 00 00 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 ba 01 00 00 49 8b 9c 24 d8 00 00 00 80 3a 00 0f 85 8c 01 00 00 <4a> 03 1c fd 40 4c 1a 83 48 89 d8 48 c1 e8 03 42 80 3c 28 00 0f RIP [] cpuacct_charge+0x14e/0x360 kernel/sched/cpuacct.c:247 RSP CR2: fffffffc857e4dc0 ---[ end trace 43da33e465025fbf ]---