====================================== | [ 3504.300851][ C0] ================================================================== | [ 3504.301143][ C0] 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:3399) | [ 3504.301354][ C0] Read of size 8 at addr 0000000000000008 by task ksoftirqd/0/15 | [ 3504.301543][ C0] [ 3504.301805][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 3504.302088][ C0] Call Trace: [ 3504.302193][ C0] [ 3504.302261][ C0] dump_stack_lvl (lib/dump_stack.c:117) [ 3504.302395][ C0] kasan_report (mm/kasan/report.c:603) [ 3504.302492][ C0] ? 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:3399) [ 3504.302663][ C0] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 3504.302802][ C0] 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:3399) [ 3504.302956][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 3504.303062][ C0] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 3504.303187][ C0] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1411 net/core/skbuff.c:1405) [ 3504.303285][ C0] skb_pp_cow_data (net/core/skbuff.c:987) [ 3504.303414][ C0] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 3504.303538][ C0] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 3504.303665][ C0] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 3504.303791][ C0] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 3504.303924][ C0] ? 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) [ 3504.304051][ C0] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 3504.304205][ C0] ? napi_gro_receive (net/core/gro.c:617) [ 3504.304330][ C0] veth_xdp_rcv (drivers/net/veth.c:905) [ 3504.304459][ C0] ? stack_trace_save (kernel/stacktrace.c:123) [ 3504.304585][ C0] ? __pfx_stack_trace_save (kernel/stacktrace.c:114) [ 3504.304711][ C0] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 3504.304837][ C0] ? kasan_save_stack (mm/kasan/common.c:49) [ 3504.304965][ C0] ? kasan_save_stack (mm/kasan/common.c:48) [ 3504.305094][ 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) [ 3504.305219][ C0] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 3504.305347][ C0] veth_poll (drivers/net/veth.c:943) [ 3504.305444][ C0] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 3504.305570][ C0] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 3504.305695][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 3504.305821][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 3504.305949][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 3504.306075][ C0] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 3504.306238][ C0] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 3504.306361][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 3504.306487][ C0] __napi_poll.constprop.0 (net/core/dev.c:6702) [ 3504.306618][ C0] net_rx_action (net/core/dev.c:6771 net/core/dev.c:6887) [ 3504.306745][ C0] ? __schedule (kernel/sched/core.c:6617) [ 3504.306873][ C0] ? __pfx_net_rx_action (net/core/dev.c:6851) [ 3504.307001][ C0] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 3504.307133][ C0] __do_softirq (kernel/softirq.c:554) [ 3504.307259][ C0] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 3504.307386][ C0] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 3504.307511][ C0] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 3504.307639][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 3504.307764][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 3504.307888][ C0] kthread (kernel/kthread.c:388) [ 3504.307984][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 3504.308110][ C0] ret_from_fork (arch/x86/kernel/process.c:147) [ 3504.308243][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 3504.308368][ C0] ret_from_fork_asm (arch/x86/entry/entry_64.S:256) | [ 3504.308598][ C0] ================================================================== | [ 3504.308796][ C0] Disabling lock debugging due to kernel taint | [ 3504.308980][ C0] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 3504.309260][ C0] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 3504.309659][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 3504.309931][ C0] 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:3399) [ 3504.310094][ C0] Code: 00 4c 8b b3 a0 01 00 00 be 08 00 00 00 4d 8d 7e 08 4c 89 ff e8 b0 0b 8b fe 4c 89 fa 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 1e 01 00 00 49 8b 46 08 a8 04 0f 84 5c fe ff ff All code ======== 0: 00 4c 8b b3 add %cl,-0x4d(%rbx,%rcx,4) 4: a0 01 00 00 be 08 00 movabs 0x8be000001,%al b: 00 00 d: 4d 8d 7e 08 lea 0x8(%r14),%r15 11: 4c 89 ff mov %r15,%rdi 14: e8 b0 0b 8b fe call 0xfffffffffe8b0bc9 19: 4c 89 fa mov %r15,%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 1e 01 00 00 jne 0x152 34: 49 8b 46 08 mov 0x8(%r14),%rax 38: a8 04 test $0x4,%al 3a: 0f 84 5c fe ff ff je 0xfffffffffffffe9c Code starting with the faulting instruction =========================================== 0: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 4: 0f 85 1e 01 00 00 jne 0x128 a: 49 8b 46 08 mov 0x8(%r14),%rax e: a8 04 test $0x4,%al 10: 0f 84 5c fe ff ff je 0xfffffffffffffe72 [ 3504.310542][ C0] RSP: 0018:ffffc900000ff6b8 EFLAGS: 00010202 [ 3504.310703][ C0] RAX: dffffc0000000000 RBX: ffff888006899140 RCX: ffffffff84d9564a [ 3504.310902][ C0] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff8a2ffa00 [ 3504.311089][ C0] RBP: ffff8880068991a0 R08: 0000000000000001 R09: fffffbfff145ff40 [ 3504.311283][ C0] R10: ffffffff8a2ffa07 R11: 205d304320202020 R12: 0000000000000000 [ 3504.311474][ C0] R13: ffff8880068992c0 R14: 0000000000000000 R15: 0000000000000008 [ 3504.311664][ C0] FS: 0000000000000000(0000) GS:ffff888036000000(0000) knlGS:0000000000000000 [ 3504.311883][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3504.312046][ C0] CR2: 00007fbdce2cb000 CR3: 0000000025738006 CR4: 0000000000770ef0 [ 3504.312235][ C0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3504.312423][ C0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3504.312613][ C0] PKRU: 55555554 [ 3504.312711][ C0] Call Trace: [ 3504.312809][ C0] [ 3504.312878][ C0] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 3504.312983][ C0] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 3504.313114][ C0] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 3504.313246][ C0] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 3504.313346][ C0] ? 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:3399) [ 3504.313503][ C0] ? 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:3399) [ 3504.313729][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 3504.313832][ C0] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 3504.313957][ C0] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1411 net/core/skbuff.c:1405) [ 3504.314050][ C0] skb_pp_cow_data (net/core/skbuff.c:987) [ 3504.314176][ C0] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 3504.314365][ C0] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 3504.314558][ C0] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 3504.314684][ C0] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 3504.314879][ C0] ? 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) [ 3504.315077][ C0] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 3504.315308][ C0] ? napi_gro_receive (net/core/gro.c:617) [ 3504.315504][ C0] veth_xdp_rcv (drivers/net/veth.c:905) [ 3504.315630][ C0] ? stack_trace_save (kernel/stacktrace.c:123) [ 3504.315819][ C0] ? __pfx_stack_trace_save (kernel/stacktrace.c:114) [ 3504.315941][ C0] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 3504.316065][ C0] ? kasan_save_stack (mm/kasan/common.c:49) [ 3504.316189][ C0] ? kasan_save_stack (mm/kasan/common.c:48) [ 3504.316381][ 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) [ 3504.316503][ C0] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 3504.316632][ C0] veth_poll (drivers/net/veth.c:943) [ 3504.316725][ C0] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 3504.316847][ C0] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 3504.317036][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 3504.317161][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 3504.317283][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 3504.317403][ C0] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 3504.317622][ C0] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 3504.317745][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 3504.317872][ C0] __napi_poll.constprop.0 (net/core/dev.c:6702) [ 3504.317997][ C0] net_rx_action (net/core/dev.c:6771 net/core/dev.c:6887) [ 3504.318188][ C0] ? __schedule (kernel/sched/core.c:6617) [ 3504.318311][ C0] ? __pfx_net_rx_action (net/core/dev.c:6851) [ 3504.318436][ C0] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 3504.318559][ C0] __do_softirq (kernel/softirq.c:554) [ 3504.318754][ C0] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 3504.318876][ C0] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 3504.319003][ C0] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 3504.319128][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 3504.319251][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 3504.319439][ C0] kthread (kernel/kthread.c:388) [ 3504.319531][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 3504.319655][ C0] ret_from_fork (arch/x86/kernel/process.c:147) [ 3504.319777][ C0] ? __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