====================================== | [ 3553.746158][ C3] ================================================================== | [ 3553.746444][ C3] BUG: KASAN: slab-use-after-free in vrf_xmit (drivers/net/vrf.c:567) | [ 3553.746647][ C3] Read of size 4 at addr ffff888002639070 by task ping/6967 | [ 3553.746875][ C3] [ 3553.747185][ C3] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 3553.747375][ C3] Call Trace: [ 3553.747500][ C3] [ 3553.747581][ C3] dump_stack_lvl (lib/dump_stack.c:123) [ 3553.747757][ C3] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 3553.747952][ C3] ? vrf_xmit (drivers/net/vrf.c:567) [ 3553.748072][ C3] print_report (mm/kasan/report.c:490) [ 3553.748224][ C3] ? kasan_addr_to_slab (./include/linux/mm.h:1294 mm/kasan/../slab.h:211 mm/kasan/common.c:38) [ 3553.748381][ C3] kasan_report (mm/kasan/report.c:604) [ 3553.748501][ C3] ? vrf_xmit (drivers/net/vrf.c:567) [ 3553.748620][ C3] vrf_xmit (drivers/net/vrf.c:567) [ 3553.748737][ 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) [ 3553.748898][ C3] __dev_queue_xmit (net/core/dev.h:291 net/core/dev.c:4435) [ 3553.749052][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3553.749206][ C3] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3553.749361][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3553.749515][ 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) [ 3553.749671][ C3] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 3553.749824][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3553.749981][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4339 kernel/locking/lockdep.c:4406) [ 3553.750170][ C3] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 3553.750337][ C3] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3553.750491][ C3] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 3553.750644][ 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) [ 3553.750799][ C3] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 3553.750915][ C3] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 3553.751065][ C3] ? ip_route_input_noref (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/ipv4/route.c:2520) [ 3553.751224][ C3] ? ip_forward_finish (./include/linux/skbuff.h:1144 ./include/net/dst.h:450 net/ipv4/ip_forward.c:80) [ 3553.751375][ C3] NF_HOOK.constprop.0 (./include/linux/netfilter.h:314) [ 3553.751526][ C3] ? __pfx_NF_HOOK.constprop.0 (./include/linux/netfilter.h:308) [ 3553.751678][ C3] ? ip_dst_mtu_maybe_forward.constprop.0 (./include/net/net_namespace.h:387 ./include/linux/netdevice.h:2635 ./include/net/ip.h:474) [ 3553.751868][ C3] ? ip_forward (net/ipv4/ip_forward.c:45 net/ipv4/ip_forward.c:135) [ 3553.752022][ 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) [ 3553.752142][ C3] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 3553.752295][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3553.752446][ C3] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 3553.752597][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3553.752751][ C3] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 3553.752905][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3553.753059][ C3] __netif_receive_skb_one_core (net/core/dev.c:5672 (discriminator 4)) [ 3553.753256][ C3] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5665) [ 3553.753451][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3553.753604][ C3] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3553.753759][ C3] process_backlog (./include/linux/rcupdate.h:878 net/core/dev.c:6118) [ 3553.753916][ C3] __napi_poll.constprop.0 (net/core/dev.c:6883) [ 3553.754068][ C3] net_rx_action (net/core/dev.c:6952 net/core/dev.c:7074) [ 3553.754224][ C3] ? __pfx_net_rx_action (net/core/dev.c:7036) [ 3553.754377][ 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) [ 3553.754534][ C3] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:94 ./include/linux/spinlock_api_smp.h:143 kernel/locking/spinlock.c:186) [ 3553.754686][ 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) [ 3553.754836][ C3] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 3553.754950][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3553.755106][ C3] handle_softirqs (kernel/softirq.c:554) [ 3553.755264][ C3] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 3553.755417][ C3] do_softirq (kernel/softirq.c:455 kernel/softirq.c:442) [ 3553.755531][ C3] [ 3553.755613][ C3] [ 3553.755690][ C3] __local_bh_enable_ip (kernel/softirq.c:382) [ 3553.755842][ C3] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 3553.755991][ C3] __dev_queue_xmit (net/core/dev.c:4462) [ 3553.756143][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3553.756294][ C3] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3553.756444][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3553.756595][ 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) [ 3553.756751][ C3] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 3553.756905][ C3] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3553.757058][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 3553.757251][ C3] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 3553.757402][ C3] ? do_csum (lib/checksum.c:56) [ 3553.757523][ C3] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3553.757673][ C3] ? __lock_acquire (kernel/locking/lockdep.c:5226) [ 3553.757828][ C3] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 3553.757979][ C3] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 3553.758131][ 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) [ 3553.758283][ C3] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 3553.758399][ C3] ? __ip_local_out (net/ipv4/ip_output.c:97 net/ipv4/ip_output.c:108) [ 3553.758549][ C3] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 3553.758698][ C3] ? __ip_make_skb (net/ipv4/ip_output.c:1386 net/ipv4/ip_output.c:1496) [ 3553.758851][ C3] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 3553.759005][ C3] ? ip_append_data (net/ipv4/ip_output.c:1375 net/ipv4/ip_output.c:1354) [ 3553.759161][ 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) [ 3553.759314][ C3] raw_sendmsg (net/ipv4/raw.c:658) [ 3553.759473][ C3] ? __pfx_raw_sendmsg (net/ipv4/raw.c:483) [ 3553.759628][ C3] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3553.759779][ C3] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3553.759930][ C3] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 47)) [ 3553.760090][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3553.760243][ C3] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 3553.760403][ C3] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 3553.760558][ C3] __sys_sendto (net/socket.c:711 net/socket.c:726 net/socket.c:2197) [ 3553.760715][ C3] ? __pfx___sys_sendto (net/socket.c:2164) [ 3553.760870][ C3] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3553.761023][ C3] ? rseq_update_cpu_node_id (kernel/rseq.c:109 (discriminator 10)) [ 3553.761177][ C3] ? __rseq_handle_notify_resume (kernel/rseq.c:333) [ 3553.761370][ C3] ? do_user_addr_fault (./include/linux/mmap_lock.h:172 arch/x86/mm/fault.c:1417) [ 3553.761524][ C3] ? __pfx___rseq_handle_notify_resume (kernel/rseq.c:316) [ 3553.761714][ C3] __x64_sys_sendto (net/socket.c:2200) [ 3553.761867][ C3] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 3553.762058][ C3] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 3553.762223][ C3] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 3553.762413][ C3] RIP: 0033:0x7f78d66bb85a [ 3553.762577][ 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 [ 3553.763110][ C3] RSP: 002b:00007fffb6ae60f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 3553.763348][ C3] RAX: ffffffffffffffda RBX: 00000000000005aa RCX: 00007f78d66bb85a [ 3553.763580][ C3] RDX: 00000000000005b2 RSI: 000000000bfb7340 RDI: 0000000000000005 [ 3553.763812][ C3] RBP: 00007fffb6ae6150 R08: 00000000004185e0 R09: 0000000000000010 [ 3553.764039][ C3] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000005c6 Finger prints: print_report:kasan_report:vrf_xmit:dev_hard_start_xmit:__dev_queue_xmit