====================================== | [ 4062.757971][ C1] ================================================================== | [ 4062.758282][ 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:3399) | [ 4062.758518][ C1] Read of size 8 at addr 0000000000000008 by task swapper/1/0 | [ 4062.758736][ C1] [ 4062.759040][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4062.759382][ C1] Call Trace: [ 4062.759505][ C1] [ 4062.759593][ C1] dump_stack_lvl (lib/dump_stack.c:117) [ 4062.759746][ C1] kasan_report (mm/kasan/report.c:603) [ 4062.759858][ 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:3399) [ 4062.760067][ C1] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 4062.760220][ 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:3399) [ 4062.760369][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4062.760482][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 4062.760630][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1411 net/core/skbuff.c:1405) [ 4062.760744][ C1] dummy_xmit (drivers/net/dummy.c:66) [ 4062.760864][ C1] ? trace_net_dev_start_xmit (./include/trace/events/net.h:14 (discriminator 52)) [ 4062.761020][ C1] dev_hard_start_xmit (./include/linux/netdevice.h:4877 ./include/linux/netdevice.h:4891 net/core/dev.c:3564 net/core/dev.c:3580) [ 4062.761181][ C1] sch_direct_xmit (net/sched/sch_generic.c:343) [ 4062.761337][ C1] ? __pfx_sch_direct_xmit (net/sched/sch_generic.c:318) [ 4062.761496][ C1] __qdisc_run (net/sched/sch_generic.c:416) [ 4062.761644][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 4062.761792][ C1] ? __pfx___qdisc_run (net/sched/sch_generic.c:412) [ 4062.761941][ C1] ? do_raw_spin_lock (./arch/x86/include/asm/atomic.h:115 ./include/linux/atomic/atomic-arch-fallback.h:2170 ./include/linux/atomic/atomic-instrumented.h:1302 ./include/asm-generic/qspinlock.h:111 kernel/locking/spinlock_debug.c:116) [ 4062.762089][ C1] ? __pfx_do_raw_spin_lock (kernel/locking/spinlock_debug.c:114) [ 4062.762237][ C1] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4062.762383][ C1] ? net_tx_action (./include/linux/spinlock.h:352 net/core/dev.c:5251) [ 4062.762535][ C1] net_tx_action (./include/net/sch_generic.h:217 ./include/net/pkt_sched.h:128 ./include/net/pkt_sched.h:124 net/core/dev.c:5267) [ 4062.762687][ C1] __do_softirq (kernel/softirq.c:554) [ 4062.762861][ C1] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4062.762980][ C1] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4062.763134][ C1] [ 4062.763211][ C1] [ 4062.763289][ C1] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4062.763479][ C1] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4062.763635][ C1] Code: 4c 01 c7 4c 29 c2 e9 72 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d e3 bc 32 00 fb f4 c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 All code ======== 0: 4c 01 c7 add %r8,%rdi 3: 4c 29 c2 sub %r8,%rdx 6: e9 72 ff ff ff jmp 0xffffffffffffff7d b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: f3 0f 1e fa endbr64 1f: 66 90 xchg %ax,%ax 21: 0f 00 2d e3 bc 32 00 verw 0x32bce3(%rip) # 0x32bd0b 28: fb sti 29: f4 hlt 2a:* fa cli <-- trapping instruction 2b: c3 ret 2c: cc int3 2d: cc int3 2e: cc int3 2f: cc int3 30: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) 37: 00 00 00 00 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop Code starting with the faulting instruction =========================================== 0: fa cli 1: c3 ret 2: cc int3 3: cc int3 4: cc int3 5: cc int3 6: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) d: 00 00 00 00 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop [ 4062.764167][ C1] RSP: 0018:ffffc9000014fdf8 EFLAGS: 00000246 [ 4062.764366][ C1] RAX: 0000000005678e17 RBX: 1ffff92000029fc1 RCX: ffffffff95535e95 [ 4062.764593][ C1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff92cac0e4 [ 4062.764819][ C1] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1005ed709c [ 4062.765043][ C1] R10: ffff88802f6b84e3 R11: ffff88802f6ad9b0 R12: 0000000000000000 [ 4062.765277][ C1] R13: ffff888001b8a300 R14: dffffc0000000000 R15: 0000000000000000 [ 4062.765515][ C1] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4062.765666][ C1] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4062.765818][ C1] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4062.765968][ C1] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4062.766121][ C1] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4062.766271][ C1] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4062.766427][ C1] do_idle (kernel/sched/idle.c:332) [ 4062.766538][ C1] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4062.766688][ C1] start_secondary (arch/x86/kernel/smpboot.c:201 arch/x86/kernel/smpboot.c:281) [ 4062.766833][ C1] ? __pfx_start_secondary (arch/x86/kernel/smpboot.c:231) [ 4062.766979][ C1] common_startup_64 (arch/x86/kernel/head_64.S:421) | [ 4062.767253][ C1] ================================================================== | [ 4062.767488][ C1] Disabling lock debugging due to kernel taint | [ 4062.767715][ C1] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 4062.768058][ C1] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 4062.768572][ C1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4062.768930][ 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:3399) [ 4062.769131][ C1] 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 [ 4062.769665][ C1] RSP: 0018:ffffc900001d8c30 EFLAGS: 00010202 [ 4062.769863][ C1] RAX: dffffc0000000000 RBX: ffff888002bbaac0 RCX: ffffffff92b9564a [ 4062.770104][ C1] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff980ffa00 [ 4062.770350][ C1] RBP: ffff888002bbab20 R08: 0000000000000001 R09: fffffbfff301ff40 [ 4062.770569][ C1] R10: ffffffff980ffa07 R11: 205d314320202020 R12: 0000000000000000 [ 4062.770805][ C1] R13: ffff888002bbac40 R14: 0000000000000000 R15: 0000000000000008 [ 4062.771042][ C1] FS: 0000000000000000(0000) GS:ffff88802f680000(0000) knlGS:0000000000000000 [ 4062.771311][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4062.771511][ C1] CR2: 00007ffa1d7e6000 CR3: 0000000035938005 CR4: 0000000000770ef0 [ 4062.771747][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4062.771981][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4062.772209][ C1] PKRU: 55555554 [ 4062.772325][ C1] Call Trace: [ 4062.772436][ C1] [ 4062.772515][ C1] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 4062.772637][ C1] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 4062.772792][ C1] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 4062.772937][ C1] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 4062.773051][ 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:3399) [ 4062.773252][ C1] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4062.773369][ C1] skb_release_head_state (net/core/skbuff.c:1162 (discriminator 3)) [ 4062.773515][ C1] consume_skb (net/core/skbuff.c:1174 net/core/skbuff.c:1189 net/core/skbuff.c:1411 net/core/skbuff.c:1405) [ 4062.773627][ C1] dummy_xmit (drivers/net/dummy.c:66) [ 4062.773737][ C1] ? trace_net_dev_start_xmit (./include/trace/events/net.h:14 (discriminator 52)) [ 4062.773886][ C1] dev_hard_start_xmit (./include/linux/netdevice.h:4877 ./include/linux/netdevice.h:4891 net/core/dev.c:3564 net/core/dev.c:3580) [ 4062.774038][ C1] sch_direct_xmit (net/sched/sch_generic.c:343) [ 4062.774188][ C1] ? __pfx_sch_direct_xmit (net/sched/sch_generic.c:318) [ 4062.774341][ C1] __qdisc_run (net/sched/sch_generic.c:416) [ 4062.774492][ C1] ? __pfx_lock_acquire.part.0 (kernel/locking/lockdep.c:5719) [ 4062.774642][ C1] ? __pfx___qdisc_run (net/sched/sch_generic.c:412) [ 4062.774788][ C1] ? do_raw_spin_lock (./arch/x86/include/asm/atomic.h:115 ./include/linux/atomic/atomic-arch-fallback.h:2170 ./include/linux/atomic/atomic-instrumented.h:1302 ./include/asm-generic/qspinlock.h:111 kernel/locking/spinlock_debug.c:116) [ 4062.774942][ C1] ? __pfx_do_raw_spin_lock (kernel/locking/spinlock_debug.c:114) [ 4062.775095][ C1] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4062.775255][ C1] ? net_tx_action (./include/linux/spinlock.h:352 net/core/dev.c:5251) [ 4062.775412][ C1] net_tx_action (./include/net/sch_generic.h:217 ./include/net/pkt_sched.h:128 ./include/net/pkt_sched.h:124 net/core/dev.c:5267) [ 4062.775649][ C1] __do_softirq (kernel/softirq.c:554) [ 4062.775799][ C1] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4062.775916][ C1] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4062.776071][ C1] [ 4062.776150][ C1] [ 4062.776228][ C1] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4062.776494][ C1] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4062.776651][ C1] Code: 4c 01 c7 4c 29 c2 e9 72 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d e3 bc 32 00 fb f4 c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 All code ======== 0: 4c 01 c7 add %r8,%rdi 3: 4c 29 c2 sub %r8,%rdx 6: e9 72 ff ff ff jmp 0xffffffffffffff7d b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: f3 0f 1e fa endbr64 1f: 66 90 xchg %ax,%ax 21: 0f 00 2d e3 bc 32 00 verw 0x32bce3(%rip) # 0x32bd0b 28: fb sti 29: f4 hlt 2a:* fa cli <-- trapping instruction 2b: c3 ret 2c: cc int3 2d: cc int3 2e: cc int3 2f: cc int3 30: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) 37: 00 00 00 00 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop Code starting with the faulting instruction =========================================== 0: fa cli 1: c3 ret 2: cc int3 3: cc int3 4: cc int3 5: cc int3 6: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) d: 00 00 00 00 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop [ 4062.777284][ C1] RSP: 0018:ffffc9000014fdf8 EFLAGS: 00000246 [ 4062.777474][ C1] RAX: 0000000005678e17 RBX: 1ffff92000029fc1 RCX: ffffffff95535e95 [ 4062.777806][ C1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff92cac0e4 [ 4062.778040][ C1] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1005ed709c [ 4062.778274][ C1] R10: ffff88802f6b84e3 R11: ffff88802f6ad9b0 R12: 0000000000000000 [ 4062.778584][ C1] R13: ffff888001b8a300 R14: dffffc0000000000 R15: 0000000000000000 [ 4062.778813][ C1] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4062.778970][ C1] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4062.779122][ C1] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4062.779272][ C1] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4062.779505][ C1] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4062.779653][ C1] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4062.779814][ C1] do_idle (kernel/sched/idle.c:332) [ 4062.779926][ C1] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4062.780170][ C1] start_secondary (arch/x86/kernel/smpboot.c:201 arch/x86/kernel/smpboot.c:281) [ 4062.780318][ C1] ? __pfx_start_secondary (arch/x86/kernel/smpboot.c:231) 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