====================================== | [ 4549.598250][ C0] ================================================================== | [ 4549.598682][ 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) | [ 4549.598922][ C0] Read of size 8 at addr 0000000000000008 by task swapper/0/0 | [ 4549.599147][ C0] [ 4549.599458][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4549.599791][ C0] Call Trace: [ 4549.599909][ C0] [ 4549.599987][ C0] dump_stack_lvl (lib/dump_stack.c:117) [ 4549.600149][ C0] kasan_report (mm/kasan/report.c:603) [ 4549.600263][ 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) [ 4549.600448][ C0] kasan_check_range (mm/kasan/generic.c:183 mm/kasan/generic.c:189) [ 4549.600601][ 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) [ 4549.600752][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4549.600869][ C0] ip6_rcv_core (./include/linux/skbuff.h:3202 net/ipv6/ip6_input.c:291) [ 4549.601025][ C0] ipv6_rcv (net/ipv6/ip6_input.c:307) [ 4549.601138][ C0] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4549.601289][ C0] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5756) [ 4549.601443][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.601594][ C0] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4549.601739][ C0] __netif_receive_skb_one_core (net/core/dev.c:5597) [ 4549.601923][ C0] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5597) [ 4549.602113][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.602262][ C0] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4549.602409][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.602555][ C0] process_backlog (./include/linux/rcupdate.h:810 net/core/dev.c:6048) [ 4549.602706][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4549.602854][ C0] ? rebalance_domains (./include/linux/rcupdate.h:339 ./include/linux/rcupdate.h:814 kernel/sched/fair.c:11753) [ 4549.603006][ C0] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 4549.603155][ C0] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 4549.603315][ C0] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 4549.603462][ C0] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4549.603610][ C0] ? __pfx_rebalance_domains (kernel/sched/fair.c:11684) [ 4549.603757][ C0] __do_softirq (kernel/softirq.c:554) [ 4549.603906][ C0] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4549.604020][ C0] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4549.604170][ C0] [ 4549.604246][ C0] [ 4549.604319][ C0] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4549.604509][ C0] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4549.604664][ C0] 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 cc 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 cc 32 00 verw 0x32cce3(%rip) # 0x32cd0b 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 [ 4549.605182][ C0] RSP: 0018:ffffffffb1807e00 EFLAGS: 00000246 [ 4549.605374][ C0] RAX: 00000000022cd92b RBX: 1ffffffff6300fc2 RCX: ffffffffb0934e95 [ 4549.605596][ C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffae0ac0e4 [ 4549.605815][ C0] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1006c0709c [ 4549.606036][ C0] R10: ffff8880360384e3 R11: ffff88803602d9b0 R12: 0000000000000000 [ 4549.606255][ C0] R13: ffffffffb1831000 R14: dffffc0000000000 R15: 0000000000014770 [ 4549.606475][ C0] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4549.606622][ C0] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4549.606769][ C0] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4549.606915][ C0] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4549.607064][ C0] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4549.607213][ C0] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4549.607362][ C0] do_idle (kernel/sched/idle.c:332) [ 4549.607474][ C0] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4549.607623][ C0] rest_init (./include/linux/rcupdate.h:782 init/main.c:703) [ 4549.607742][ C0] start_kernel (init/main.c:1024 (discriminator 1)) [ 4549.607891][ C0] x86_64_start_reservations (arch/x86/kernel/head64.c:495) [ 4549.608041][ C0] x86_64_start_kernel (arch/x86/kernel/head64.c:437 (discriminator 17)) [ 4549.608188][ C0] common_startup_64 (arch/x86/kernel/head_64.S:421) | [ 4549.608462][ C0] ================================================================== | [ 4549.608675][ C0] Disabling lock debugging due to kernel taint | [ 4549.608891][ C0] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN NOPTI | [ 4549.609225][ C0] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 4549.609695][ C0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 4549.610015][ 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) [ 4549.610204][ 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 [ 4549.610707][ C0] RSP: 0018:ffffc90000007b28 EFLAGS: 00010202 [ 4549.610891][ C0] RAX: dffffc0000000000 RBX: ffff888004858040 RCX: ffffffffadf9564a [ 4549.611112][ C0] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffffb34fda00 [ 4549.611325][ C0] RBP: ffff8880048580a0 R08: 0000000000000001 R09: fffffbfff669fb40 [ 4549.611539][ C0] R10: ffffffffb34fda07 R11: 205d304320202020 R12: 0000000000000000 [ 4549.611752][ C0] R13: ffff8880048581c0 R14: 0000000000000008 R15: 0000000000000000 [ 4549.611963][ C0] FS: 0000000000000000(0000) GS:ffff888036000000(0000) knlGS:0000000000000000 [ 4549.612218][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4549.612402][ C0] CR2: 00007fc8a7bd7520 CR3: 000000000b194002 CR4: 0000000000770ef0 [ 4549.612616][ C0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4549.612833][ C0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4549.613049][ C0] PKRU: 55555554 [ 4549.613164][ C0] Call Trace: [ 4549.613273][ C0] [ 4549.613350][ C0] ? die_addr (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:460) [ 4549.613463][ C0] ? exc_general_protection (arch/x86/kernel/traps.c:702 arch/x86/kernel/traps.c:644) [ 4549.613610][ C0] ? asm_exc_general_protection (./arch/x86/include/asm/idtentry.h:617) [ 4549.613755][ C0] ? add_taint (./arch/x86/include/asm/bitops.h:60 ./include/asm-generic/bitops/instrumented-atomic.h:29 kernel/panic.c:555) [ 4549.613867][ 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) [ 4549.614046][ 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) [ 4549.614225][ C0] sock_wfree (./include/linux/rcupdate.h:810 net/core/sock.c:2471) [ 4549.614338][ C0] ip6_rcv_core (./include/linux/skbuff.h:3202 net/ipv6/ip6_input.c:291) [ 4549.614485][ C0] ipv6_rcv (net/ipv6/ip6_input.c:307) [ 4549.614594][ C0] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4549.614736][ C0] ? lock_acquire.part.0 (kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5756) [ 4549.614879][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.615024][ C0] ? __pfx_ipv6_rcv (net/ipv6/ip6_input.c:304) [ 4549.615167][ C0] __netif_receive_skb_one_core (net/core/dev.c:5597) [ 4549.615346][ C0] ? __pfx___netif_receive_skb_one_core (net/core/dev.c:5597) [ 4549.615526][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.615669][ C0] ? lock_acquire (kernel/locking/lockdep.c:5727) [ 4549.615813][ C0] ? process_backlog (./include/linux/rcupdate.h:329 ./include/linux/rcupdate.h:781 net/core/dev.c:6046) [ 4549.615957][ C0] process_backlog (./include/linux/rcupdate.h:810 net/core/dev.c:6048) [ 4549.616100][ C0] ? __lock_release (kernel/locking/lockdep.c:5430) [ 4549.616242][ C0] ? rebalance_domains (./include/linux/rcupdate.h:339 ./include/linux/rcupdate.h:814 kernel/sched/fair.c:11753) [ 4549.616388][ C0] __napi_poll.constprop.0 (net/core/dev.c:6701) [ 4549.616535][ C0] net_rx_action (net/core/dev.c:6770 net/core/dev.c:6886) [ 4549.616679][ C0] ? __pfx_net_rx_action (net/core/dev.c:6850) [ 4549.616824][ C0] ? __pfx_tmigr_handle_remote (kernel/time/timer_migration.c:1026) [ 4549.616971][ C0] ? __pfx_rebalance_domains (kernel/sched/fair.c:11684) [ 4549.617117][ C0] __do_softirq (kernel/softirq.c:554) [ 4549.617265][ C0] irq_exit_rcu (kernel/softirq.c:428 kernel/softirq.c:633 kernel/softirq.c:645) [ 4549.617375][ C0] sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1043 arch/x86/kernel/apic/apic.c:1043) [ 4549.617521][ C0] [ 4549.617594][ C0] [ 4549.617669][ C0] asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702) [ 4549.617851][ C0] RIP: 0010:default_idle (./arch/x86/include/asm/irqflags.h:37 ./arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:743) [ 4549.617998][ C0] 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 cc 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 cc 32 00 verw 0x32cce3(%rip) # 0x32cd0b 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 [ 4549.618516][ C0] RSP: 0018:ffffffffb1807e00 EFLAGS: 00000246 [ 4549.618701][ C0] RAX: 00000000022cd92b RBX: 1ffffffff6300fc2 RCX: ffffffffb0934e95 [ 4549.618914][ C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffae0ac0e4 [ 4549.619129][ C0] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1006c0709c [ 4549.619346][ C0] R10: ffff8880360384e3 R11: ffff88803602d9b0 R12: 0000000000000000 [ 4549.619563][ C0] R13: ffffffffb1831000 R14: dffffc0000000000 R15: 0000000000014770 [ 4549.619776][ C0] ? ct_kernel_exit.constprop.0 (kernel/context_tracking.c:147) [ 4549.619917][ C0] ? cpuidle_idle_call (kernel/sched/idle.c:192) [ 4549.620064][ C0] default_idle_call (./include/linux/cpuidle.h:143 kernel/sched/idle.c:118) [ 4549.620208][ C0] cpuidle_idle_call (kernel/sched/idle.c:192) [ 4549.620350][ C0] ? __pfx_cpuidle_idle_call (kernel/sched/idle.c:168) [ 4549.620491][ C0] ? tsc_verify_tsc_adjust (arch/x86/kernel/tsc_sync.c:59) [ 4549.620634][ C0] do_idle (kernel/sched/idle.c:332) [ 4549.620742][ C0] cpu_startup_entry (kernel/sched/idle.c:429 (discriminator 1)) [ 4549.620886][ C0] rest_init (./include/linux/rcupdate.h:782 init/main.c:703) [ 4549.620993][ C0] start_kernel (init/main.c:1024 (discriminator 1)) [ 4549.621141][ C0] x86_64_start_reservations (arch/x86/kernel/head64.c:495) [ 4549.621282][ C0] x86_64_start_kernel (arch/x86/kernel/head64.c:437 (discriminator 17)) 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