====================================== | [ 1862.337429][ C0] ================================================================== | [ 1862.337815][ 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:3397) | [ 1862.338169][ C0] Read of size 8 at addr 0000000000000008 by task ksoftirqd/0/15 | [ 1862.338497][ C0] [ 1862.338968][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1862.339458][ C0] Call Trace: [ 1862.339635][ C0] [ 1862.339751][ C0] dump_stack_lvl (lib/dump_stack.c:117) [ 1862.339978][ C0] kasan_report (mm/kasan/report.c:603) [ 1862.340154][ 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:3397) [ 1862.340439][ C0] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 1862.340654][ 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:3397) [ 1862.340871][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1862.341050][ C0] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1862.341276][ C0] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1862.341454][ C0] skb_pp_cow_data (net/core/skbuff.c:987) [ 1862.341672][ C0] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1862.341891][ C0] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1862.342121][ C0] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1862.342341][ C0] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1862.342568][ 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) [ 1862.342786][ C0] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1862.343062][ C0] ? napi_gro_receive (net/core/gro.c:617) [ 1862.343296][ C0] veth_xdp_rcv (drivers/net/veth.c:905) [ 1862.343526][ C0] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1862.343758][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1862.343978][ 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) [ 1862.344207][ C0] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1862.344431][ C0] veth_poll (drivers/net/veth.c:943) [ 1862.344603][ C0] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1862.344832][ C0] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 1862.345001][ 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) [ 1862.345233][ C0] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 1862.345401][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1862.345616][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1862.345835][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1862.346057][ C0] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1862.346287][ C0] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1862.346514][ C0] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1862.346733][ C0] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 1862.346944][ C0] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1862.347181][ C0] __do_softirq (kernel/softirq.c:554) [ 1862.347407][ C0] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1862.347635][ C0] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1862.347871][ C0] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1862.348105][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1862.348331][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1862.348565][ C0] kthread (kernel/kthread.c:388) [ 1862.348739][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 1862.348969][ C0] ret_from_fork (arch/x86/kernel/process.c:147) [ 1862.349207][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 1862.349426][ C0] ret_from_fork_asm (arch/x86/entry/entry_64.S:256) | [ 1862.349819][ C0] ================================================================== | [ 1862.350161][ C0] Disabling lock debugging due to kernel taint | [ 1862.350482][ C0] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 1862.350966][ C0] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 1862.351667][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 1862.352158][ 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:3397) [ 1862.352449][ C0] 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 [ 1862.353232][ C0] RSP: 0018:ffffc900000ff6b8 EFLAGS: 00010202 [ 1862.353526][ C0] RAX: dffffc0000000000 RBX: ffff888003e72700 RCX: ffffffff9df9564a [ 1862.353880][ C0] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffa34fda00 [ 1862.354230][ C0] RBP: ffff888003e72760 R08: 0000000000000001 R09: fffffbfff469fb40 [ 1862.354569][ C0] R10: ffffffffa34fda07 R11: 205d304320202020 R12: 0000000000000000 [ 1862.354909][ C0] R13: ffff888003e72880 R14: 0000000000000008 R15: 0000000000000000 [ 1862.355249][ C0] FS: 0000000000000000(0000) GS:ffff88802f600000(0000) knlGS:0000000000000000 [ 1862.355645][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1862.355912][ C0] CR2: 00007f78b8e5b000 CR3: 0000000037538001 CR4: 0000000000770ef0 [ 1862.356223][ C0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1862.356534][ C0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1862.356848][ C0] PKRU: 55555554 [ 1862.357009][ C0] Call Trace: [ 1862.357177][ C0] [ 1862.357281][ C0] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 1862.357442][ C0] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 1862.357659][ C0] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 1862.357865][ C0] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 1862.358022][ 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:3397) [ 1862.358286][ 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:3397) [ 1862.358559][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 1862.358728][ C0] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 1862.358947][ C0] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 1862.359106][ C0] skb_pp_cow_data (net/core/skbuff.c:987) [ 1862.359312][ C0] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 1862.359511][ C0] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 1862.359718][ C0] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 1862.359920][ C0] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 1862.360124][ 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) [ 1862.360331][ C0] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 1862.360588][ C0] ? napi_gro_receive (net/core/gro.c:617) [ 1862.360793][ C0] veth_xdp_rcv (drivers/net/veth.c:905) [ 1862.361001][ C0] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 1862.361212][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1862.361423][ 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) [ 1862.361624][ C0] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 1862.361834][ C0] veth_poll (drivers/net/veth.c:943) [ 1862.361996][ C0] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 1862.362204][ C0] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 1862.362371][ 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) [ 1862.362580][ C0] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 1862.362744][ C0] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 1862.362963][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 1862.363172][ C0] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 1862.363399][ C0] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 1862.363625][ C0] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 1862.363886][ C0] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 1862.364102][ C0] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 1862.364319][ C0] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 1862.364540][ C0] __do_softirq (kernel/softirq.c:554) [ 1862.364755][ C0] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 1862.364964][ C0] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 1862.365178][ C0] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 1862.365389][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1862.365606][ C0] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 1862.365831][ C0] kthread (kernel/kthread.c:388) [ 1862.366001][ C0] ? __pfx_kthread (kernel/kthread.c:341) [ 1862.366214][ C0] ret_from_fork (arch/x86/kernel/process.c:147) [ 1862.366430][ 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