================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in dev_queue_xmit_nit+0x7b5/0x950 net/core/dev.c:1925 Read of size 8 at addr ffff8880a48a9aa8 by task syz-executor.4/28318 CPU: 1 PID: 28318 Comm: syz-executor.4 Not tainted 4.14.210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 __read_once_size include/linux/compiler.h:183 [inline] dev_queue_xmit_nit+0x7b5/0x950 net/core/dev.c:1925 xmit_one net/core/dev.c:3001 [inline] dev_hard_start_xmit+0xaa/0x890 net/core/dev.c:3021 __dev_queue_xmit+0x1d7f/0x2480 net/core/dev.c:3521 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip_finish_output2+0x9db/0x1340 net/ipv4/ip_output.c:230 ip_finish_output+0x37b/0xc50 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1cd/0x510 net/ipv4/ip_output.c:406 dst_output include/net/dst.h:470 [inline] ip_local_out+0x93/0x170 net/ipv4/ip_output.c:125 iptunnel_xmit+0x5cc/0x950 net/ipv4/ip_tunnel_core.c:91 geneve_xmit_skb drivers/net/geneve.c:864 [inline] geneve_xmit+0xc94/0x2880 drivers/net/geneve.c:942 __netdev_start_xmit include/linux/netdevice.h:4039 [inline] netdev_start_xmit include/linux/netdevice.h:4048 [inline] xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021 __dev_queue_xmit+0x1d7f/0x2480 net/core/dev.c:3521 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip6_finish_output2+0xc6a/0x1f10 net/ipv6/ip6_output.c:120 ip6_finish_output+0x60c/0xaf0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1c5/0x660 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:470 [inline] NF_HOOK include/linux/netfilter.h:250 [inline] mld_sendpack+0x5fe/0xea0 net/ipv6/mcast.c:1660 mld_send_cr net/ipv6/mcast.c:1956 [inline] mld_ifc_timer_expire+0x57c/0xcd0 net/ipv6/mcast.c:2455 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x254/0xa1d kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:192 RSP: 0018:ffff88809e6bf350 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff11e1251 RBX: 0000000000000286 RCX: 1ffff1100c22658a RDX: dffffc0000000000 RSI: ffff888061132c58 RDI: 0000000000000286 RBP: ffffffff8c006808 R08: 1ffff110140bec11 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88805acc8000 R13: 0000000000000006 R14: ffffffff8c006808 R15: ffff8880a05f6070 __debug_check_no_obj_freed lib/debugobjects.c:760 [inline] debug_check_no_obj_freed+0x2c0/0x674 lib/debugobjects.c:776 free_pages_prepare mm/page_alloc.c:1064 [inline] __free_pages_ok+0x215/0xeb0 mm/page_alloc.c:1262 free_thread_stack kernel/fork.c:262 [inline] release_task_stack kernel/fork.c:347 [inline] put_task_stack+0xa0/0x1c0 kernel/fork.c:358 finish_task_switch+0x42c/0x610 kernel/sched/core.c:2692 context_switch kernel/sched/core.c:2811 [inline] __schedule+0x893/0x1de0 kernel/sched/core.c:3384 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:3508 ___preempt_schedule+0x16/0x18 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] _raw_spin_unlock_irqrestore+0xaf/0xe0 kernel/locking/spinlock.c:192 __rcu_read_unlock+0x158/0x160 kernel/rcu/update.c:260 rcu_read_unlock include/linux/rcupdate.h:684 [inline] count_memcg_event_mm include/linux/memcontrol.h:661 [inline] handle_mm_fault+0x1b7/0x7a0 mm/memory.c:4223 faultin_page mm/gup.c:514 [inline] __get_user_pages+0x445/0x11d0 mm/gup.c:714 __get_user_pages_locked mm/gup.c:885 [inline] __get_user_pages_unlocked mm/gup.c:999 [inline] get_user_pages_unlocked+0x1df/0x2e0 mm/gup.c:1024 get_user_pages_fast+0x21b/0x2b0 mm/gup.c:1883 iov_iter_get_pages+0x203/0xd50 lib/iov_iter.c:1081 zerocopy_from_iter+0x1a2/0x540 net/tls/tls_sw.c:324 tls_sw_sendmsg+0xb57/0xfd0 net/tls/tls_sw.c:451 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45de79 RSP: 002b:00007f0c53434c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045de79 RDX: 00000000e0ffffff RSI: 00000000200005c0 RDI: 0000000000000003 RBP: 000000000118bf78 R08: 0000000000000000 R09: 00000000000000d8 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007fff1be542df R14: 00007f0c534359c0 R15: 000000000118bf2c Allocated by task 28331: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sk_prot_alloc+0x1ba/0x290 net/core/sock.c:1467 sk_alloc+0x36/0xcd0 net/core/sock.c:1521 packet_create+0xf5/0x7f0 net/packet/af_packet.c:3295 __sock_create+0x303/0x620 net/socket.c:1275 sock_create net/socket.c:1315 [inline] SYSC_socket net/socket.c:1345 [inline] SyS_socket+0xd1/0x1b0 net/socket.c:1325 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 28328: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 sk_prot_free net/core/sock.c:1504 [inline] __sk_destruct+0x5e3/0x760 net/core/sock.c:1582 sk_destruct net/core/sock.c:1597 [inline] __sk_free+0xd9/0x2d0 net/core/sock.c:1605 sk_free+0x2b/0x40 net/core/sock.c:1616 sock_put include/net/sock.h:1662 [inline] packet_release+0x837/0xa80 net/packet/af_packet.c:3124 __sock_release+0xcd/0x2b0 net/socket.c:602 sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a48a92c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 2024 bytes inside of 2048-byte region [ffff8880a48a92c0, ffff8880a48a9ac0) The buggy address belongs to the page: page:ffffea0002922a00 count:1 mapcount:0 mapping:ffff8880a48a81c0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880a48a81c0 0000000000000000 0000000100000003 raw: ffffea00017a85a0 ffffea000274c6a0 ffff88813fe80c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a48a9980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a48a9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a48a9a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880a48a9b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a48a9b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================