====================================== | [ 4593.733827][ C2] ================================================================== | [ 4593.734134][ 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:3399) | [ 4593.734341][ C2] Read of size 8 at addr 0000000000000008 by task swapper/2/0 | [ 4593.734535][ C2] [ 4593.734808][ C2] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4593.735091][ C2] Call Trace: [ 4593.735189][ C2] [ 4593.735257][ C2] dump_stack_lvl (lib/dump_stack.c:117) [ 4593.735393][ C2] kasan_report (mm/kasan/report.c:603) [ 4593.735492][ 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:3399) [ 4593.735653][ C2] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 4593.735779][ 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:3399) [ 4593.735906][ C2] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4593.736003][ C2] ip6_rcv_core (./include/linux/skbuff.h:3202 net/ipv6/ip6_input.c:291) [ 4593.736132][ C2] ipv6_rcv (net/ipv6/ip6_input.c:307) [ 4593.736230][ C2] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4593.736365][ C2] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5756) [ 4593.736492][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.736623][ C2] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4593.736749][ C2] __netif_receive_skb_one_core (net/core/dev.c:5598) [ 4593.736907][ C2] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5598) [ 4593.737065][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.737193][ C2] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4593.737319][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.737448][ C2] process_backlog (./include/linux/rcupdate.h:810 net/core/dev.c:6049) [ 4593.737575][ C2] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4593.737703][ C2] ? rebalance_domains (./include/linux/rcupdate.h:339 ./include/linux/rcupdate.h:814 kernel/sched/fair.c:11753) [ 4593.737834][ C2] __napi_poll.constprop.0 (net/core/dev.c:6702) [ 4593.737962][ C2] net_rx_action (net/core/dev.c:6771 net/core/dev.c:6887) [ 4593.738092][ C2] ? __pfx_net_rx_action (net/core/dev.c:6851) [ 4593.738220][ C2] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4593.738351][ C2] ? spin_bug (./include/linux/pid.h:232 kernel/locking/spinlock_debug.c:64 kernel/locking/spinlock_debug.c:78) [ 4593.738449][ C2] ? __pfx_rebalance_domains (kernel/sched/fair.c:11684) [ 4593.738580][ C2] __do_softirq (kernel/softirq.c:554) [ 4593.738710][ C2] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4593.738808][ C2] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4593.738934][ C2] [ 4593.739000][ C2] [ 4593.739063][ C2] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4593.739221][ C2] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4593.739359][ C2] 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 [ 4593.739803][ C2] RSP: 0018:ffffc9000015fdf8 EFLAGS: 00000242 [ 4593.739966][ C2] RAX: 0000000004809f01 RBX: 1ffff9200002bfc1 RCX: ffffffff94d35e95 [ 4593.740154][ C2] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff924ac0e4 [ 4593.740347][ C2] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1006c2709c [ 4593.740534][ C2] R10: ffff8880361384e3 R11: ffff88803612d9b0 R12: 0000000000000000 [ 4593.740722][ C2] R13: ffff888001b8c5c0 R14: dffffc0000000000 R15: 0000000000000000 [ 4593.740910][ C2] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4593.741036][ C2] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4593.741167][ C2] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4593.741291][ C2] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4593.741417][ C2] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4593.741543][ C2] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4593.741670][ C2] do_idle (kernel/sched/idle.c:332) [ 4593.741765][ C2] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4593.741891][ C2] start_secondary (arch/x86/kernel/smpboot.c:201 arch/x86/kernel/smpboot.c:281) [ 4593.742018][ C2] ? __pfx_start_secondary (arch/x86/kernel/smpboot.c:231) [ 4593.742146][ C2] common_startup_64 (arch/x86/kernel/head_64.S:421) | [ 4593.742369][ C2] ================================================================== | [ 4593.742553][ C2] Disabling lock debugging due to kernel taint | [ 4593.742740][ C2] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 4593.743013][ C2] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 4593.743414][ C2] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4593.743689][ 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:3399) [ 4593.743848][ C2] 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 [ 4593.744286][ C2] RSP: 0018:ffffc90000230b28 EFLAGS: 00010202 [ 4593.744442][ C2] RAX: dffffc0000000000 RBX: ffff88800a5399c0 RCX: ffffffff9239564a [ 4593.744627][ C2] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff978ffa00 [ 4593.744812][ C2] RBP: ffff88800a539a20 R08: 0000000000000001 R09: fffffbfff2f1ff40 [ 4593.745001][ C2] R10: ffffffff978ffa07 R11: 205d324320202020 R12: 0000000000000000 [ 4593.745186][ C2] R13: ffff88800a539b40 R14: 0000000000000000 R15: 0000000000000008 [ 4593.745372][ C2] FS: 0000000000000000(0000) GS:ffff888036100000(0000) knlGS:0000000000000000 [ 4593.745589][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4593.745746][ C2] CR2: 00007fc42acd5258 CR3: 000000002ff38005 CR4: 0000000000770ef0 [ 4593.745936][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4593.746120][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4593.746311][ C2] PKRU: 55555554 [ 4593.746405][ C2] Call Trace: [ 4593.746501][ C2] [ 4593.746565][ C2] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 4593.746677][ C2] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 4593.746808][ C2] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 4593.746934][ C2] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 4593.747030][ 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:3399) [ 4593.747188][ 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:3399) [ 4593.747341][ C2] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4593.747437][ C2] ip6_rcv_core (./include/linux/skbuff.h:3202 net/ipv6/ip6_input.c:291) [ 4593.747563][ C2] ipv6_rcv (net/ipv6/ip6_input.c:307) [ 4593.747657][ C2] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4593.747786][ C2] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5756) [ 4593.747910][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.748036][ C2] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4593.748159][ C2] __netif_receive_skb_one_core (net/core/dev.c:5598) [ 4593.748315][ C2] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5598) [ 4593.748468][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.748590][ C2] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4593.748712][ C2] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6047) [ 4593.748837][ C2] process_backlog (./include/linux/rcupdate.h:810 net/core/dev.c:6049) [ 4593.748963][ C2] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4593.749086][ C2] ? rebalance_domains (./include/linux/rcupdate.h:339 ./include/linux/rcupdate.h:814 kernel/sched/fair.c:11753) [ 4593.749211][ C2] __napi_poll.constprop.0 (net/core/dev.c:6702) [ 4593.749336][ C2] net_rx_action (net/core/dev.c:6771 net/core/dev.c:6887) [ 4593.749461][ C2] ? __pfx_net_rx_action (net/core/dev.c:6851) [ 4593.749583][ C2] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4593.749706][ C2] ? spin_bug (./include/linux/pid.h:232 kernel/locking/spinlock_debug.c:64 kernel/locking/spinlock_debug.c:78) [ 4593.749799][ C2] ? __pfx_rebalance_domains (kernel/sched/fair.c:11684) [ 4593.749926][ C2] __do_softirq (kernel/softirq.c:554) [ 4593.750050][ C2] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4593.750144][ C2] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4593.750266][ C2] [ 4593.750330][ C2] [ 4593.750393][ C2] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4593.750546][ C2] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4593.750676][ C2] 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 [ 4593.751114][ C2] RSP: 0018:ffffc9000015fdf8 EFLAGS: 00000242 [ 4593.751269][ C2] RAX: 0000000004809f01 RBX: 1ffff9200002bfc1 RCX: ffffffff94d35e95 [ 4593.751453][ C2] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff924ac0e4 [ 4593.751639][ C2] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1006c2709c [ 4593.751824][ C2] R10: ffff8880361384e3 R11: ffff88803612d9b0 R12: 0000000000000000 [ 4593.752010][ C2] R13: ffff888001b8c5c0 R14: dffffc0000000000 R15: 0000000000000000 [ 4593.752195][ C2] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4593.752318][ C2] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4593.752444][ C2] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4593.752566][ C2] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4593.752692][ C2] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4593.752816][ C2] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4593.752939][ C2] do_idle (kernel/sched/idle.c:332) [ 4593.753034][ C2] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4593.753159][ C2] start_secondary (arch/x86/kernel/smpboot.c:201 arch/x86/kernel/smpboot.c:281) [ 4593.753283][ C2] ? __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:ip6_rcv_core:ipv6_rcv