====================================== | [ 3442.038169][ C0] ================================================================== | [ 3442.038440][ C0] BUG: KASAN: slab-use-after-free in vrf_xmit (drivers/net/vrf.c:567) | [ 3442.038635][ C0] Read of size 4 at addr ffff88800213faf0 by task ping/28868 | [ 3442.038858][ C0] [ 3442.039162][ C0] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 3442.039366][ C0] Call Trace: [ 3442.039483][ C0] [ 3442.039562][ C0] dump_stack_lvl (lib/dump_stack.c:123) [ 3442.039718][ C0] print_address_description.constprop.0 (mm/kasan/report.c:379) [ 3442.039912][ C0] ? vrf_xmit (drivers/net/vrf.c:567) [ 3442.040030][ C0] print_report (mm/kasan/report.c:490) [ 3442.040182][ C0] ? kasan_addr_to_slab (./include/linux/mm.h:1294 mm/kasan/../slab.h:211 mm/kasan/common.c:38) [ 3442.040334][ C0] kasan_report (mm/kasan/report.c:604) [ 3442.040456][ C0] ? vrf_xmit (drivers/net/vrf.c:567) [ 3442.040575][ C0] vrf_xmit (drivers/net/vrf.c:567) [ 3442.040692][ C0] dev_hard_start_xmit (./include/linux/netdevice.h:5042 ./include/linux/netdevice.h:5051 net/core/dev.c:3590 net/core/dev.c:3606) [ 3442.040847][ C0] __dev_queue_xmit (net/core/dev.h:291 net/core/dev.c:4435) [ 3442.041001][ C0] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3442.041156][ C0] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3442.041311][ C0] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3442.041469][ C0] ? 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) [ 3442.041623][ C0] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 3442.041776][ C0] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3442.041931][ C0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4339 kernel/locking/lockdep.c:4406) [ 3442.042120][ C0] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 3442.042275][ C0] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3442.042431][ C0] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 3442.042590][ C0] ? __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) [ 3442.042745][ C0] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 3442.042860][ C0] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 3442.043014][ C0] ? ip_route_input_noref (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:880 net/ipv4/route.c:2520) [ 3442.043169][ C0] ? ip_forward_finish (./include/linux/skbuff.h:1144 ./include/net/dst.h:450 net/ipv4/ip_forward.c:80) [ 3442.043321][ C0] NF_HOOK.constprop.0 (./include/linux/netfilter.h:314) [ 3442.043472][ C0] ? __pfx_NF_HOOK.constprop.0 (./include/linux/netfilter.h:308) [ 3442.043624][ C0] ? ip_dst_mtu_maybe_forward.constprop.0 (./include/net/net_namespace.h:387 ./include/linux/netdevice.h:2635 ./include/net/ip.h:474) [ 3442.043816][ C0] ? ip_forward (net/ipv4/ip_forward.c:45 net/ipv4/ip_forward.c:135) [ 3442.043969][ C0] 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) [ 3442.044085][ C0] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 3442.044241][ C0] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3442.044393][ C0] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851) [ 3442.044547][ C0] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3442.044698][ C0] ? __pfx_ip_rcv (net/ipv4/ip_input.c:560) [ 3442.044855][ C0] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3442.045006][ C0] __netif_receive_skb_one_core (net/core/dev.c:5672 (discriminator 4)) [ 3442.045194][ C0] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5665) [ 3442.045384][ C0] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3442.045536][ C0] ? process_backlog (./include/linux/local_lock_internal.h:38 net/core/dev.c:6115) [ 3442.045689][ C0] process_backlog (./include/linux/rcupdate.h:878 net/core/dev.c:6118) [ 3442.045842][ C0] __napi_poll.constprop.0 (net/core/dev.c:6883) [ 3442.045999][ C0] net_rx_action (net/core/dev.c:6952 net/core/dev.c:7074) [ 3442.046155][ C0] ? __pfx_net_rx_action (net/core/dev.c:7036) [ 3442.046308][ C0] ? _nohz_idle_balance.isra.0 (kernel/sched/sched.h:1542 kernel/sched/sched.h:1821 kernel/sched/fair.c:12593) [ 3442.046496][ C0] ? 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) [ 3442.046646][ C0] ? mark_lock (kernel/locking/lockdep.c:4727 (discriminator 3)) [ 3442.046763][ C0] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3442.046916][ C0] handle_softirqs (kernel/softirq.c:554) [ 3442.047068][ C0] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 3442.047222][ C0] do_softirq (kernel/softirq.c:455 kernel/softirq.c:442) [ 3442.047339][ C0] [ 3442.047420][ C0] [ 3442.047496][ C0] __local_bh_enable_ip (kernel/softirq.c:382) [ 3442.047647][ C0] ? __dev_queue_xmit (./include/linux/rcupdate.h:347 ./include/linux/rcupdate.h:917 net/core/dev.c:4461) [ 3442.047800][ C0] __dev_queue_xmit (net/core/dev.c:4462) [ 3442.047963][ C0] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3442.048115][ C0] ? ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3442.048270][ C0] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3442.048421][ C0] ? 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) [ 3442.048573][ C0] ? __pfx___dev_queue_xmit (net/core/dev.c:4343) [ 3442.048726][ C0] ? mark_held_locks (kernel/locking/lockdep.c:4321) [ 3442.048883][ C0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 3442.049073][ C0] ? neigh_hh_output (./include/linux/seqlock.h:74 ./include/linux/seqlock.h:813 ./include/net/neighbour.h:493) [ 3442.049226][ C0] ? do_csum (lib/checksum.c:56) [ 3442.049348][ C0] ip_finish_output2 (./include/net/neighbour.h:537 net/ipv4/ip_output.c:236) [ 3442.049502][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5226) [ 3442.049673][ C0] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 3442.049828][ C0] ? __pfx_ip_finish_output2 (net/ipv4/ip_output.c:200) [ 3442.049980][ C0] ? __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) [ 3442.050133][ C0] ip_output (./include/linux/netfilter.h:303 net/ipv4/ip_output.c:434) [ 3442.050248][ C0] ? __ip_local_out (net/ipv4/ip_output.c:97 net/ipv4/ip_output.c:108) [ 3442.050399][ C0] ? __pfx_ip_output (net/ipv4/ip_output.c:428) [ 3442.050555][ C0] ? __ip_make_skb (net/ipv4/ip_output.c:1386 net/ipv4/ip_output.c:1496) [ 3442.050708][ C0] ? __pfx_raw_getfrag (net/ipv4/raw.c:453) [ 3442.050860][ C0] ? ip_append_data (net/ipv4/ip_output.c:1375 net/ipv4/ip_output.c:1354) [ 3442.051017][ C0] 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) [ 3442.051170][ C0] raw_sendmsg (net/ipv4/raw.c:658) [ 3442.051325][ C0] ? __pfx_raw_sendmsg (net/ipv4/raw.c:483) [ 3442.051480][ C0] ? __lock_release (kernel/locking/lockdep.c:5525) [ 3442.051633][ C0] ? __pfx___lock_release (kernel/locking/lockdep.c:5501) [ 3442.051789][ C0] ? trace_lock_acquire (./include/trace/events/lock.h:24 (discriminator 47)) [ 3442.051941][ C0] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3442.052093][ C0] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 3442.052250][ C0] ? __might_fault (mm/memory.c:6751 mm/memory.c:6744) [ 3442.052403][ C0] __sys_sendto (net/socket.c:711 net/socket.c:726 net/socket.c:2197) [ 3442.052556][ C0] ? __pfx___sys_sendto (net/socket.c:2164) [ 3442.052709][ C0] ? lock_acquire (kernel/locking/lockdep.c:5822) [ 3442.052866][ C0] ? rseq_update_cpu_node_id (kernel/rseq.c:109 (discriminator 10)) [ 3442.053021][ C0] ? __rseq_handle_notify_resume (kernel/rseq.c:333) [ 3442.053209][ C0] ? do_user_addr_fault (./include/linux/mmap_lock.h:172 arch/x86/mm/fault.c:1417) [ 3442.053362][ C0] ? __pfx___rseq_handle_notify_resume (kernel/rseq.c:316) [ 3442.053555][ C0] __x64_sys_sendto (net/socket.c:2200) [ 3442.053708][ C0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4347 kernel/locking/lockdep.c:4406) [ 3442.053895][ C0] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 3442.054051][ C0] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 3442.054242][ C0] RIP: 0033:0x7f375245b85a [ 3442.054400][ C0] 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 [ 3442.054935][ C0] RSP: 002b:00007ffeb4f22b38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 3442.055170][ C0] RAX: ffffffffffffffda RBX: 00000000000005aa RCX: 00007f375245b85a [ 3442.055398][ C0] RDX: 00000000000005b2 RSI: 000000003c957340 RDI: 0000000000000005 [ 3442.055627][ C0] RBP: 00007ffeb4f22b90 R08: 00000000004185e0 R09: 0000000000000010 [ 3442.055857][ C0] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000005c6 Finger prints: print_report:kasan_report:vrf_xmit:dev_hard_start_xmit:__dev_queue_xmit