====================================== | [ 4389.457946][ C3] ================================================================== | [ 4389.458331][ C3] BUG: KASAN: slab-use-after-free in vrf_xmit (drivers/net/vrf.c:567) | [ 4389.458619][ C3] Read of size 4 at addr ffff8880020b33f0 by task ping/11190 | [ 4389.458909][ C3] [ 4389.459232][ C3] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 4389.459427][ C3] Call Trace: [ 4389.459548][ C3] [ 4389.459629][ C3] dump_stack_lvl (lib/dump_stack.c:123) [ 4389.459791][ C3] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 4389.459995][ C3] ? vrf_xmit (drivers/net/vrf.c:567) [ 4389.460121][ C3] print_report (mm/kasan/report.c:490) [ 4389.460283][ C3] ? kasan_addr_to_slab (./include/linux/mm.h:1294 mm/kasan/../slab.h:211 mm/kasan/common.c:38) [ 4389.460441][ C3] kasan_report (mm/kasan/report.c:604) [ 4389.460559][ C3] ? vrf_xmit (drivers/net/vrf.c:567) [ 4389.460681][ C3] vrf_xmit (drivers/net/vrf.c:567) [ 4389.460805][ C3] dev_hard_start_xmit (./include/linux/netdevice.h:5042 ./include/linux/netdevice.h:5051 net/core/dev.c:3590 net/core/dev.c:3606) [ 4389.460969][ C3] __dev_queue_xmit (net/core/dev.h:291 net/core/dev.c:4435) [ 4389.461129][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 4389.461289][ C3] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 4389.461447][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 4389.461604][ C3] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 4389.461758][ C3] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 4389.461915][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 4389.462072][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4339 kernel/locking/lockdep.c:4406) [ 4389.462275][ C3] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 4389.462433][ C3] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 4389.462591][ C3] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 4389.462749][ C3] ? __ip_finish_output (./include/linux/skbuff.h:1670 ./include/linux/skbuff.h:5049 net/ipv4/ip_output.c:308 net/ipv4/ip_output.c:296) [ 4389.462905][ C3] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 4389.463024][ C3] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 4389.463180][ C3] ? ip_route_input_noref (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/ipv4/route.c:2520) [ 4389.463340][ C3] ? ip_forward_finish (./include/linux/skbuff.h:1144 ./include/net/dst.h:450 net/ipv4/ip_forward.c:80) [ 4389.463500][ C3] NF_HOOK.constprop.0 (./include/linux/netfilter.h:314) [ 4389.463656][ C3] ? __pfx_NF_HOOK.constprop.0 (./include/linux/netfilter.h:308) [ 4389.463811][ C3] ? ip_dst_mtu_maybe_forward.constprop.0 (./include/net/net_namespace.h:387 ./include/linux/netdevice.h:2635 ./include/net/ip.h:474) [ 4389.464008][ C3] ? ip_forward (net/ipv4/ip_forward.c:45 net/ipv4/ip_forward.c:135) [ 4389.464166][ C3] ip_rcv (./include/net/dst.h:460 ./include/net/dst.h:458 net/ipv4/ip_input.c:447 ./include/linux/netfilter.h:314 ./include/linux/netfilter.h:308 net/ipv4/ip_input.c:567) [ 4389.464284][ C3] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 4389.464440][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 4389.464599][ C3] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 4389.464756][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 4389.464911][ C3] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 4389.465068][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 4389.465224][ C3] __netif_receive_skb_one_core (net/core/dev.c:5672 (discriminator 4)) [ 4389.465418][ C3] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5665) [ 4389.465613][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 4389.465770][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 4389.465930][ C3] process_backlog (./include/linux/rcupdate.h:878 net/core/dev.c:6118) [ 4389.466106][ C3] __napi_poll.constprop.0 (net/core/dev.c:6883) [ 4389.466277][ C3] net_rx_action (net/core/dev.c:6952 net/core/dev.c:7074) [ 4389.466436][ C3] ? __pfx_net_rx_action (net/core/dev.c:7036) [ 4389.466596][ C3] ? do_raw_spin_unlock (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/atomic/atomic-instrumented.h:33 ./include/asm-generic/qspinlock.h:57 kernel/locking/spinlock_debug.c:101 kernel/locking/spinlock_debug.c:141) [ 4389.466752][ C3] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:94 ./include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) [ 4389.466911][ C3] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 4389.467065][ C3] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 4389.467186][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 4389.467345][ C3] handle_softirqs (kernel/softirq.c:554) [ 4389.467502][ C3] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 4389.467660][ C3] do_softirq (kernel/softirq.c:455 kernel/softirq.c:442) [ 4389.467781][ C3] [ 4389.467863][ C3] [ 4389.467956][ C3] __local_bh_enable_ip (kernel/softirq.c:382) [ 4389.468115][ C3] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 4389.468272][ C3] __dev_queue_xmit (net/core/dev.c:4462) [ 4389.468430][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 4389.468586][ C3] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 4389.468772][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 4389.468935][ C3] ? hlock_class (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 kernel/locking/lockdep.c:228) [ 4389.469107][ C3] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 4389.469270][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 4389.469428][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 4389.469620][ C3] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 4389.469777][ C3] ? do_csum (lib/checksum.c:56) [ 4389.469899][ C3] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 4389.470063][ C3] ? __lock_acquire (kernel/locking/lockdep.c:5226) [ 4389.470217][ C3] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 4389.470372][ C3] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 4389.470534][ C3] ? __ip_finish_output (./include/linux/skbuff.h:1670 ./include/linux/skbuff.h:5049 net/ipv4/ip_output.c:308 net/ipv4/ip_output.c:296) [ 4389.470689][ C3] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 4389.470807][ C3] ? __ip_local_out (net/ipv4/ip_output.c:97 net/ipv4/ip_output.c:108) [ 4389.470964][ C3] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 4389.471119][ C3] ? __ip_make_skb (net/ipv4/ip_output.c:1386 net/ipv4/ip_output.c:1496) [ 4389.471275][ C3] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 4389.471430][ C3] ? ip_append_data (net/ipv4/ip_output.c:1375 net/ipv4/ip_output.c:1354) [ 4389.471592][ C3] ip_push_pending_frames (./include/net/dst.h:450 net/ipv4/ip_output.c:130 net/ipv4/ip_output.c:1505 net/ipv4/ip_output.c:1525) [ 4389.471750][ C3] raw_sendmsg (net/ipv4/raw.c:658) [ 4389.471914][ C3] ? __pfx_raw_sendmsg (net/ipv4/raw.c:483) [ 4389.472085][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 4389.472243][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 4389.472399][ C3] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 47)) [ 4389.472556][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 4389.472712][ C3] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 4389.472878][ C3] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 4389.473038][ C3] __sys_sendto (net/socket.c:711 net/socket.c:726 net/socket.c:2197) [ 4389.473201][ C3] ? __pfx___sys_sendto (net/socket.c:2164) [ 4389.473360][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 4389.473519][ C3] ? rseq_update_cpu_node_id (kernel/rseq.c:109 (discriminator 10)) [ 4389.473679][ C3] ? __rseq_handle_notify_resume (kernel/rseq.c:333) [ 4389.473871][ C3] ? do_user_addr_fault (./include/linux/mmap_lock.h:172 arch/x86/mm/fault.c:1417) [ 4389.474033][ C3] ? __pfx___rseq_handle_notify_resume (kernel/rseq.c:316) [ 4389.474231][ C3] __x64_sys_sendto (net/socket.c:2200) [ 4389.474385][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 4389.474580][ C3] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 4389.474739][ C3] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 4389.474936][ C3] RIP: 0033:0x7f19bade785a [ 4389.475099][ C3] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89 All code ======== 0: d8 64 89 02 fsubs 0x2(%rcx,%rcx,4) 4: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax b: eb b8 jmp 0xffffffffffffffc5 d: 0f 1f 00 nopl (%rax) 10: f3 0f 1e fa endbr64 14: 41 89 ca mov %ecx,%r10d 17: 64 8b 04 25 18 00 00 mov %fs:0x18,%eax 1e: 00 1f: 85 c0 test %eax,%eax 21: 75 15 jne 0x38 23: b8 2c 00 00 00 mov $0x2c,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 7e ja 0xb0 32: c3 ret 33: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 38: 41 54 push %r12 3a: 48 83 ec 30 sub $0x30,%rsp 3e: 44 rex.R 3f: 89 .byte 0x89 Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 7e ja 0x86 8: c3 ret 9: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) e: 41 54 push %r12 10: 48 83 ec 30 sub $0x30,%rsp 14: 44 rex.R 15: 89 .byte 0x89 [ 4389.475655][ C3] RSP: 002b:00007ffc6695bf58 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 4389.475891][ C3] RAX: ffffffffffffffda RBX: 00000000000005aa RCX: 00007f19bade785a [ 4389.476134][ C3] RDX: 00000000000005b2 RSI: 000000000bd8d340 RDI: 0000000000000005 [ 4389.476388][ C3] RBP: 00007ffc6695bfb0 R08: 00000000004185e0 R09: 0000000000000010 [ 4389.476661][ C3] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000005c6 Finger prints: print_report:kasan_report:vrf_xmit:dev_hard_start_xmit:__dev_queue_xmit