====================================== | [ 1247.559077][ C1] ================================================================== | [ 1247.559396][ C1] BUG: KASAN: null-ptr-deref in sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) | [ 1247.559618][ C1] Read of size 8 at addr 0000000000000008 by task ksoftirqd/1/23 | [ 1247.559833][ C1] [ 1247.560161][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1247.560490][ C1] Call Trace: [ 1247.560607][ C1] [ 1247.560683][ C1] dump_stack_lvl (lib/dump_stack.c:117) [ 1247.560831][ C1] kasan_report (mm/kasan/report.c:603) [ 1247.560949][ C1] ? sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) [ 1247.561139][ C1] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 1247.561297][ C1] sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) [ 1247.561445][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1247.561562][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1247.561705][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1247.561815][ C1] skb_pp_cow_data (net/core/skbuff.c:987) [ 1247.561956][ C1] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1247.562097][ C1] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1247.562242][ C1] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1247.562391][ C1] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1247.562533][ C1] ? dev_gro_receive (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/gro.c:537) [ 1247.562676][ C1] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1247.562849][ C1] ? napi_gro_receive (net/core/gro.c:617) [ 1247.562994][ C1] veth_xdp_rcv (drivers/net/veth.c:905) [ 1247.563136][ C1] ? stack_trace_save (kernel/stacktrace.c:123) [ 1247.563280][ C1] ? __pfx_stack_trace_save (kernel/stacktrace.c:114) [ 1247.563420][ C1] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1247.563562][ C1] ? kasan_save_stack (mm/kasan/common.c:49) [ 1247.563703][ C1] ? kasan_save_stack (mm/kasan/common.c:48) [ 1247.563848][ C1] ? 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) [ 1247.563991][ C1] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1247.564136][ C1] veth_poll (drivers/net/veth.c:943) [ 1247.564245][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1247.564385][ C1] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1247.564527][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1247.564671][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1247.564813][ C1] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1247.564956][ C1] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 1247.565134][ C1] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 1247.565275][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1247.565421][ C1] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1247.565564][ C1] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1247.565708][ C1] ? __schedule (kernel/sched/core.c:6617) [ 1247.565850][ C1] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1247.565990][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1247.566131][ C1] __do_softirq (kernel/softirq.c:554) [ 1247.566273][ C1] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1247.566414][ C1] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1247.566555][ C1] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1247.566696][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1247.566835][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1247.566973][ C1] kthread (kernel/kthread.c:388) [ 1247.567079][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1247.567220][ C1] ret_from_fork (arch/x86/kernel/process.c:147) [ 1247.567364][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1247.567503][ C1] ret_from_fork_asm (arch/x86/entry/entry_64.S:256) | [ 1247.567771][ C1] ================================================================== | [ 1247.567987][ C1] Disabling lock debugging due to kernel taint | [ 1247.568189][ C1] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1247.568497][ C1] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 1247.568950][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1247.569253][ C1] RIP: 0010:sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) [ 1247.569430][ C1] Code: 00 4c 8b bb a0 01 00 00 be 08 00 00 00 4d 8d 77 08 4c 89 f7 e8 e0 0e 8b fe 4c 89 f2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 fe 00 00 00 49 8b 47 08 a8 04 0f 85 dc fe ff ff All code ======== 0: 00 4c 8b bb add %cl,-0x45(%rbx,%rcx,4) 4: a0 01 00 00 be 08 00 movabs 0x8be000001,%al b: 00 00 d: 4d 8d 77 08 lea 0x8(%r15),%r14 11: 4c 89 f7 mov %r14,%rdi 14: e8 e0 0e 8b fe call 0xfffffffffe8b0ef9 19: 4c 89 f2 mov %r14,%rdx 1c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 23: fc ff df 26: 48 c1 ea 03 shr $0x3,%rdx 2a:* 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction 2e: 0f 85 fe 00 00 00 jne 0x132 34: 49 8b 47 08 mov 0x8(%r15),%rax 38: a8 04 test $0x4,%al 3a: 0f 85 dc fe ff ff jne 0xffffffffffffff1c Code starting with the faulting instruction =========================================== 0: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 4: 0f 85 fe 00 00 00 jne 0x108 a: 49 8b 47 08 mov 0x8(%r15),%rax e: a8 04 test $0x4,%al 10: 0f 85 dc fe ff ff jne 0xfffffffffffffef2 [ 1247.569927][ C1] RSP: 0018:ffffc900001af6b8 EFLAGS: 00010202 [ 1247.570105][ C1] RAX: dffffc0000000000 RBX: ffff8880094c5dc0 RCX: ffffffff9779564a [ 1247.570321][ C1] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff9ccfda00 [ 1247.570532][ C1] RBP: ffff8880094c5e20 R08: 0000000000000001 R09: fffffbfff399fb40 [ 1247.570749][ C1] R10: ffffffff9ccfda07 R11: 205d314320202020 R12: 0000000000000000 [ 1247.570964][ C1] R13: ffff8880094c5f40 R14: 0000000000000008 R15: 0000000000000000 [ 1247.571173][ C1] FS: 0000000000000000(0000) GS:ffff888036080000(0000) knlGS:0000000000000000 [ 1247.571422][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1247.571599][ C1] CR2: 00007f2b73691000 CR3: 0000000011738002 CR4: 0000000000770ef0 [ 1247.571814][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1247.572031][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1247.572246][ C1] PKRU: 55555554 [ 1247.572355][ C1] Call Trace: [ 1247.572466][ C1] [ 1247.572545][ C1] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1247.572656][ C1] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 1247.572800][ C1] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 1247.572949][ C1] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 1247.573059][ C1] ? sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) [ 1247.573235][ C1] ? sock_def_write_space_wfree (./arch/x86/include/asm/bitops.h:206 ./arch/x86/include/asm/bitops.h:238 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/sock.c:3397) [ 1247.573407][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1247.573514][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1247.573654][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1247.573758][ C1] skb_pp_cow_data (net/core/skbuff.c:987) [ 1247.573901][ C1] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1247.574041][ C1] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1247.574180][ C1] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1247.574320][ C1] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1247.574458][ C1] ? dev_gro_receive (./arch/x86/include/asm/bitops.h:227 ./arch/x86/include/asm/bitops.h:239 ./include/asm-generic/bitops/instrumented-non-atomic.h:142 net/core/gro.c:537) [ 1247.574598][ C1] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1247.574773][ C1] ? napi_gro_receive (net/core/gro.c:617) [ 1247.574912][ C1] veth_xdp_rcv (drivers/net/veth.c:905) [ 1247.575053][ C1] ? stack_trace_save (kernel/stacktrace.c:123) [ 1247.575190][ C1] ? __pfx_stack_trace_save (kernel/stacktrace.c:114) [ 1247.575635][ C1] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1247.575772][ C1] ? kasan_save_stack (mm/kasan/common.c:49) [ 1247.575914][ C1] ? kasan_save_stack (mm/kasan/common.c:48) [ 1247.576053][ C1] ? 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) [ 1247.576192][ C1] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1247.576332][ C1] veth_poll (drivers/net/veth.c:943) [ 1247.576436][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1247.576576][ C1] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1247.576718][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1247.576860][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1247.576998][ C1] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1247.577137][ C1] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 1247.577308][ C1] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 1247.577445][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1247.577581][ C1] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1247.577730][ C1] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1247.577872][ C1] ? __schedule (kernel/sched/core.c:6617) [ 1247.578018][ C1] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1247.578157][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1247.578298][ C1] __do_softirq (kernel/softirq.c:554) [ 1247.578436][ C1] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1247.578574][ C1] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1247.578710][ C1] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1247.578846][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1247.578985][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1247.579124][ C1] kthread (kernel/kthread.c:388) [ 1247.579230][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1247.579369][ C1] ret_from_fork (arch/x86/kernel/process.c:147) [ 1247.579582][ C1] ? __pfx_kthread (kernel/kthread.c:341) Finger prints: dump_stack_lvl:kasan_report:kasan_check_range:sock_def_write_space_wfree sock_def_write_space_wfree:sock_wfree:skb_release_head_state:consume_skb