====================================== | [ 1889.303500][ C1] ================================================================== | [ 1889.303759][ 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) | [ 1889.303977][ C1] Read of size 8 at addr 0000000000000008 by task ksoftirqd/1/23 | [ 1889.304172][ C1] [ 1889.304463][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1889.304751][ C1] Call Trace: [ 1889.304860][ C1] [ 1889.304930][ C1] dump_stack_lvl (lib/dump_stack.c:117) [ 1889.305070][ C1] kasan_report (mm/kasan/report.c:603) [ 1889.305172][ 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) [ 1889.305336][ C1] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 1889.305466][ 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) [ 1889.305594][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1889.305690][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1889.305817][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1889.305911][ C1] skb_pp_cow_data (net/core/skbuff.c:987) [ 1889.306041][ C1] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1889.306170][ C1] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1889.306305][ C1] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1889.306431][ C1] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1889.306571][ 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) [ 1889.306699][ C1] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1889.306857][ C1] ? napi_gro_receive (net/core/gro.c:617) [ 1889.306983][ C1] veth_xdp_rcv (drivers/net/veth.c:905) [ 1889.307113][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1889.307242][ C1] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1889.307378][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1889.307505][ 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) [ 1889.307634][ C1] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1889.307767][ C1] veth_poll (drivers/net/veth.c:943) [ 1889.307860][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1889.307983][ C1] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1889.308112][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1889.308241][ C1] ? lock_acquire.part.0 (kernel/locking/lockdep.c:5758) [ 1889.308372][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1889.308498][ C1] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1889.308623][ C1] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 1889.308780][ C1] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 1889.308905][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1889.309032][ C1] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1889.309167][ C1] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1889.309295][ C1] ? __schedule (kernel/sched/core.c:6617) [ 1889.309424][ C1] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1889.309555][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1889.309682][ C1] __do_softirq (kernel/softirq.c:554) [ 1889.309807][ C1] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1889.309936][ C1] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1889.310060][ C1] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1889.310186][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1889.310310][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1889.310445][ C1] kthread (kernel/kthread.c:388) [ 1889.310542][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1889.310672][ C1] ret_from_fork (arch/x86/kernel/process.c:147) [ 1889.310801][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1889.310928][ C1] ret_from_fork_asm (arch/x86/entry/entry_64.S:256) | [ 1889.311159][ C1] ================================================================== | [ 1889.311363][ C1] Disabling lock debugging due to kernel taint | [ 1889.311557][ C1] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1889.311845][ C1] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 1889.312243][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1889.312525][ 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) [ 1889.312688][ 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 [ 1889.313132][ C1] RSP: 0018:ffffc900001af6b8 EFLAGS: 00010202 [ 1889.313291][ C1] RAX: dffffc0000000000 RBX: ffff888007e60040 RCX: ffffffffb559564a [ 1889.313504][ C1] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbaafda00 [ 1889.313695][ C1] RBP: ffff888007e600a0 R08: 0000000000000001 R09: fffffbfff755fb40 [ 1889.313886][ C1] R10: ffffffffbaafda07 R11: 205d314320202020 R12: 0000000000000000 [ 1889.314071][ C1] R13: ffff888007e601c0 R14: 0000000000000008 R15: 0000000000000000 [ 1889.314257][ C1] FS: 0000000000000000(0000) GS:ffff888036080000(0000) knlGS:0000000000000000 [ 1889.314509][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1889.314667][ C1] CR2: 00007f9a29024000 CR3: 0000000023938002 CR4: 0000000000770ef0 [ 1889.314864][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1889.315054][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1889.315254][ C1] PKRU: 55555554 [ 1889.315354][ C1] Call Trace: [ 1889.315454][ C1] [ 1889.315520][ C1] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1889.315621][ C1] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 1889.315755][ C1] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 1889.315894][ C1] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 1889.315996][ 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) [ 1889.316156][ 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) [ 1889.316319][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1889.316422][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1889.316549][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1889.316645][ C1] skb_pp_cow_data (net/core/skbuff.c:987) [ 1889.316775][ C1] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1889.316902][ C1] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1889.317038][ C1] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1889.317163][ C1] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1889.317290][ 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) [ 1889.317417][ C1] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1889.317573][ C1] ? napi_gro_receive (net/core/gro.c:617) [ 1889.317702][ C1] veth_xdp_rcv (drivers/net/veth.c:905) [ 1889.317832][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1889.317956][ C1] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1889.318086][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1889.318216][ 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) [ 1889.318342][ C1] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1889.318477][ C1] veth_poll (drivers/net/veth.c:943) [ 1889.318571][ C1] ? __pfx_validate_chain (kernel/locking/lockdep.c:3825) [ 1889.318698][ C1] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1889.318824][ C1] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1889.318951][ C1] ? lock_acquire.part.0 (kernel/locking/lockdep.c:5758) [ 1889.319076][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1889.319202][ C1] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1889.319332][ C1] ? finish_task_switch.isra.0 (kernel/sched/sched.h:1397 kernel/sched/core.c:5163 kernel/sched/core.c:5281) [ 1889.319493][ C1] ? __pfx___lock_release (kernel/locking/lockdep.c:5406) [ 1889.319615][ C1] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1889.319739][ C1] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1889.319935][ C1] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1889.320064][ C1] ? __schedule (kernel/sched/core.c:6617) [ 1889.320188][ C1] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1889.320311][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1889.320507][ C1] __do_softirq (kernel/softirq.c:554) [ 1889.320634][ C1] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1889.320760][ C1] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1889.320883][ C1] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1889.321079][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1889.321202][ C1] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1889.321323][ C1] kthread (kernel/kthread.c:388) [ 1889.321416][ C1] ? __pfx_kthread (kernel/kthread.c:341) [ 1889.321541][ C1] ret_from_fork (arch/x86/kernel/process.c:147) [ 1889.321733][ 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