====================================== | [ 4236.927162][ C2] ================================================================== | [ 4236.927568][ C2] 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) | [ 4236.927831][ C2] Read of size 8 at addr 0000000000000008 by task ksoftirqd/2/28 | [ 4236.928069][ C2] [ 4236.928397][ C2] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4236.928728][ C2] Call Trace: [ 4236.928845][ C2] [ 4236.928921][ C2] dump_stack_lvl (lib/dump_stack.c:117) [ 4236.929068][ C2] kasan_report (mm/kasan/report.c:603) [ 4236.929178][ C2] ? 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) [ 4236.929362][ C2] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 4236.929506][ C2] 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) [ 4236.929649][ C2] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4236.929759][ C2] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 4236.929926][ C2] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 4236.930034][ C2] skb_pp_cow_data (net/core/skbuff.c:987) [ 4236.930180][ C2] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 4236.930336][ C2] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 4236.930494][ C2] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 4236.930636][ C2] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 4236.930789][ C2] ? 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) [ 4236.930937][ C2] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 4236.931133][ C2] ? napi_gro_receive (net/core/gro.c:617) [ 4236.931288][ C2] veth_xdp_rcv (drivers/net/veth.c:905) [ 4236.931448][ C2] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 4236.931591][ C2] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 4236.931773][ C2] ? 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) [ 4236.931918][ C2] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 4236.932107][ C2] veth_poll (drivers/net/veth.c:943) [ 4236.932216][ C2] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 4236.932363][ C2] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 4236.932478][ C2] ? 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) [ 4236.932619][ C2] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 4236.932744][ C2] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 4236.932889][ C2] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4236.933042][ C2] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 4236.933193][ C2] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 4236.933337][ C2] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 4236.933481][ C2] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 4236.933625][ C2] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4236.933797][ C2] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 4236.933940][ C2] __do_softirq (kernel/softirq.c:554) [ 4236.934083][ C2] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 4236.934241][ C2] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 4236.934383][ C2] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 4236.934546][ C2] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 4236.934688][ C2] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 4236.934841][ C2] kthread (kernel/kthread.c:388) [ 4236.934957][ C2] ? __pfx_kthread (kernel/kthread.c:341) [ 4236.935099][ C2] ret_from_fork (arch/x86/kernel/process.c:147) [ 4236.935257][ C2] ? __pfx_kthread (kernel/kthread.c:341) [ 4236.935411][ C2] ret_from_fork_asm (arch/x86/entry/entry_64.S:256) | [ 4236.935685][ C2] ================================================================== | [ 4236.935947][ C2] Disabling lock debugging due to kernel taint | [ 4236.936162][ C2] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 4236.936494][ C2] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 4236.936965][ C2] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4236.937279][ C2] 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) [ 4236.937462][ C2] 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 [ 4236.938020][ C2] RSP: 0018:ffffc900002076b8 EFLAGS: 00010202 [ 4236.938229][ C2] RAX: dffffc0000000000 RBX: ffff8880079e8040 RCX: ffffffffb919564a [ 4236.938441][ C2] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffbe6fda00 [ 4236.938647][ C2] RBP: ffff8880079e80a0 R08: 0000000000000001 R09: fffffbfff7cdfb40 [ 4236.938861][ C2] R10: ffffffffbe6fda07 R11: 205d324320202020 R12: 0000000000000000 [ 4236.939091][ C2] R13: ffff8880079e81c0 R14: 0000000000000008 R15: 0000000000000000 [ 4236.939318][ C2] FS: 0000000000000000(0000) GS:ffff888036100000(0000) knlGS:0000000000000000 [ 4236.939584][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4236.939769][ C2] CR2: 00007f0c875cb000 CR3: 0000000023738001 CR4: 0000000000770ef0 [ 4236.939995][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4236.940210][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4236.940427][ C2] PKRU: 55555554 [ 4236.940544][ C2] Call Trace: [ 4236.940659][ C2] [ 4236.940737][ C2] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 4236.940848][ C2] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 4236.941006][ C2] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 4236.941157][ C2] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 4236.941272][ C2] ? 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) [ 4236.941448][ C2] ? 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) [ 4236.941626][ C2] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4236.941737][ C2] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 4236.941875][ C2] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1405 net/core/skbuff.c:1399) [ 4236.941982][ C2] skb_pp_cow_data (net/core/skbuff.c:987) [ 4236.942130][ C2] ? __pfx_skb_pp_cow_data (net/core/skbuff.c:916) [ 4236.942277][ C2] ? veth_xdp_rcv_skb (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 drivers/net/veth.c:775) [ 4236.942433][ C2] veth_xdp_rcv_skb (drivers/net/veth.c:732 drivers/net/veth.c:783) [ 4236.942575][ C2] ? __pfx_veth_xdp_rcv_skb (drivers/net/veth.c:765) [ 4236.942734][ C2] ? 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) [ 4236.942880][ C2] ? trace_napi_gro_receive_exit (./include/trace/events/net.h:288 (discriminator 52)) [ 4236.943066][ C2] ? napi_gro_receive (net/core/gro.c:617) [ 4236.943212][ C2] veth_xdp_rcv (drivers/net/veth.c:905) [ 4236.943368][ C2] ? __pfx_veth_xdp_rcv (drivers/net/veth.c:875) [ 4236.943513][ C2] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 4236.943665][ C2] ? 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) [ 4236.943854][ C2] ? validate_chain (./include/linux/hash.h:78 kernel/locking/lockdep.c:3759 kernel/locking/lockdep.c:3782 kernel/locking/lockdep.c:3837) [ 4236.944000][ C2] veth_poll (drivers/net/veth.c:943) [ 4236.944146][ C2] ? __pfx_veth_poll (drivers/net/veth.c:931) [ 4236.944291][ C2] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 4236.944398][ C2] ? 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) [ 4236.944554][ C2] ? mark_lock (kernel/locking/lockdep.c:4656 (discriminator 3)) [ 4236.944663][ C2] ? __lock_acquire (kernel/locking/lockdep.c:5137) [ 4236.944817][ C2] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4236.944959][ C2] ? find_held_lock (kernel/locking/lockdep.c:5244) [ 4236.945131][ C2] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 4236.945275][ C2] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 4236.945440][ C2] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 4236.945579][ C2] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4236.945721][ C2] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 4236.945873][ C2] __do_softirq (kernel/softirq.c:554) [ 4236.946025][ C2] ? __pfx_run_ksoftirqd (kernel/softirq.c:917) [ 4236.946162][ C2] run_ksoftirqd (kernel/softirq.c:411 kernel/softirq.c:925 kernel/softirq.c:916) [ 4236.946313][ C2] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 4236.946475][ C2] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 4236.946625][ C2] ? __pfx_smpboot_thread_fn (kernel/smpboot.c:107) [ 4236.946799][ C2] kthread (kernel/kthread.c:388) [ 4236.946912][ C2] ? __pfx_kthread (kernel/kthread.c:341) [ 4236.947097][ C2] ret_from_fork (arch/x86/kernel/process.c:147) [ 4236.947241][ C2] ? __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