syzbot


BUG: unable to handle kernel NULL pointer dereference in perf_misc_flags

Status: auto-closed as invalid on 2020/10/16 02:30
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+8e689633d6906e9e258c@syzkaller.appspotmail.com
First crash: 1393d, last: 1378d

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000005
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 90895067 P4D 90895067 PUD 35b9f067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3600 Comm: syz-executor.4 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:perf_misc_flags+0x0/0x1a8 arch/x86/events/core.c:2615
Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
RSP: 0018:ffffc90000007928 EFLAGS: 00010046
RAX: 0000000000000005 RBX: ffffc90000007a20 RCX: ffffc90000007a26
RDX: 0000000000000000 RSI: ffffffff81907ada RDI: ffffc90008007b68
RBP: ffffc90000007b80 R08: 0000000000000000 R09: ffffffff8c599a27
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88804dbe8000 R14: ffffc90000007a24 R15: ffffc90000007a20
FS:  00007fd3b59ee700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000005 CR3: 0000000034049000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 perf_prepare_sample+0x173/0x1d40 kernel/events/core.c:6985
 __perf_event_output kernel/events/core.c:7154 [inline]
 perf_event_output_forward+0xf3/0x270 kernel/events/core.c:7174
 __perf_event_overflow+0x13c/0x370 kernel/events/core.c:8746
 perf_swevent_hrtimer+0x27e/0x3e0 kernel/events/core.c:10130
 __run_hrtimer kernel/time/hrtimer.c:1520 [inline]
 __hrtimer_run_queues+0x1d5/0xfc0 kernel/time/hrtimer.c:1584
 hrtimer_interrupt+0x32a/0x930 kernel/time/hrtimer.c:1646
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1080 [inline]
 __sysvec_apic_timer_interrupt+0x142/0x5e0 arch/x86/kernel/apic/apic.c:1097
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711
 </IRQ>
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 sysvec_apic_timer_interrupt+0xe0/0x120 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:587
RIP: 0010:should_resched arch/x86/include/asm/preempt.h:102 [inline]
RIP: 0010:__local_bh_enable_ip+0x189/0x250 kernel/softirq.c:196
Code: 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 c4 00 00 00 48 83 3d 60 5a 6e 08 00 74 7b fb 66 0f 1f 44 00 00 <65> 8b 05 80 78 bb 7e 85 c0 74 6b 5b 5d 41 5c c3 80 3d a3 66 63 09
RSP: 0018:ffffc90008007c18 EFLAGS: 00000286
RAX: 1ffffffff1369c12 RBX: 0000000000000201 RCX: 0000000000000007
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffffffff81468609
RBP: ffffffff876c62b9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88804de80100
R13: ffffc90008007db8 R14: ffff88803a0f0000 R15: 0000000000000000
 spin_unlock_bh include/linux/spinlock.h:398 [inline]
 nl80211_netlink_notify net/wireless/nl80211.c:17308 [inline]
 nl80211_netlink_notify+0x649/0x970 net/wireless/nl80211.c:17260
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 __blocking_notifier_call_chain kernel/notifier.c:284 [inline]
 __blocking_notifier_call_chain kernel/notifier.c:271 [inline]
 blocking_notifier_call_chain kernel/notifier.c:295 [inline]
 blocking_notifier_call_chain+0x67/0x90 kernel/notifier.c:292
 netlink_release+0xc51/0x1cf0 net/netlink/af_netlink.c:774
 __sock_release+0xcd/0x280 net/socket.c:605
 sock_close+0x18/0x20 net/socket.c:1278
 __fput+0x33c/0x880 fs/file_table.c:281
 task_work_run+0xdd/0x190 kernel/task_work.c:135
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:239 [inline]
 __prepare_exit_to_usermode+0x1e9/0x1f0 arch/x86/entry/common.c:269
 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
BUG: unable to handle page fault for address: 0000000080010001
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 90895067 P4D 90895067 PUD 0 
Oops: 0002 [#2] PREEMPT SMP KASAN
CPU: 0 PID: 3600 Comm: syz-executor.4 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:in_gate_area_no_mm+0x0/0x6a arch/x86/entry/vsyscall/vsyscall_64.c:343
Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
RSP: 0018:ffffc90000006e40 EFLAGS: 00010046
RAX: 0000000080010001 RBX: ffffc90000006ee0 RCX: ffffffff816a6060
RDX: ffff88804de80100 RSI: ffffffff816a608b RDI: 0000000000415d51
RBP: 0000000000415d51 R08: ffffc90000006ff0 R09: ffffffff8c8d6109
R10: 0000000000415d51 R11: 0000000000000000 R12: ffffc90000006ff0
R13: 0000000000000001 R14: 0000000000415d51 R15: ffffc90000006f00
FS:  00007fd3b59ee700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000080010001 CR3: 0000000034049000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 is_kernel include/linux/kallsyms.h:44 [inline]
 is_ksym_addr include/linux/kallsyms.h:50 [inline]
 kallsyms_lookup+0xc3/0x2e0 kernel/kallsyms.c:290
 __sprint_symbol+0x9c/0x1c0 kernel/kallsyms.c:363
 symbol_string+0x14c/0x370 lib/vsprintf.c:969
 pointer+0x185/0x970 lib/vsprintf.c:2226
 vsnprintf+0x5b2/0x14f0 lib/vsprintf.c:2624
 vscnprintf+0x29/0x80 lib/vsprintf.c:2723
 vprintk_store+0x44/0x4a0 kernel/printk/printk.c:1942
 vprintk_emit+0x139/0x770 kernel/printk/printk.c:2003
 vprintk_func+0x8f/0x1a6 kernel/printk/printk_safe.c:393
 printk+0xba/0xed kernel/printk/printk.c:2070
 show_ip+0x22/0x30 arch/x86/kernel/dumpstack.c:124
 show_iret_regs+0x10/0x32 arch/x86/kernel/dumpstack.c:131
 __show_regs+0x18/0x50 arch/x86/kernel/process_64.c:72
 show_trace_log_lvl+0x255/0x2b4 arch/x86/kernel/dumpstack.c:274
 show_regs arch/x86/kernel/dumpstack.c:447 [inline]
 __die_body arch/x86/kernel/dumpstack.c:393 [inline]
 __die+0x51/0x90 arch/x86/kernel/dumpstack.c:407
 no_context+0x56b/0x9f0 arch/x86/mm/fault.c:695
 __bad_area_nosemaphore+0xa9/0x480 arch/x86/mm/fault.c:789
 do_user_addr_fault+0x783/0xd00 arch/x86/mm/fault.c:1171
 handle_page_fault arch/x86/mm/fault.c:1365 [inline]
 exc_page_fault+0xab/0x170 arch/x86/mm/fault.c:1418
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:544
RIP: 0010:perf_misc_flags+0x0/0x1a8 arch/x86/events/core.c:2615
Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
RSP: 0018:ffffc90000007928 EFLAGS: 00010046
RAX: 0000000000000005 RBX: ffffc90000007a20 RCX: ffffc90000007a26
RDX: 0000000000000000 RSI: ffffffff81907ada RDI: ffffc90008007b68
RBP: ffffc90000007b80 R08: 0000000000000000 R09: ffffffff8c599a27
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88804dbe8000 R14: ffffc90000007a24 R15: ffffc90000007a20
 perf_prepare_sample+0x173/0x1d40 kernel/events/core.c:6985
 __perf_event_output kernel/events/core.c:7154 [inline]
 perf_event_output_forward+0xf3/0x270 kernel/events/core.c:7174
 __perf_event_overflow+0x13c/0x370 kernel/events/core.c:8746
 perf_swevent_hrtimer+0x27e/0x3e0 kernel/events/core.c:10130
 __run_hrtimer kernel/time/hrtimer.c:1520 [inline]
 __hrtimer_run_queues+0x1d5/0xfc0 kernel/time/hrtimer.c:1584
 hrtimer_interrupt+0x32a/0x930 kernel/time/hrtimer.c:1646
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1080 [inline]
 __sysvec_apic_timer_interrupt+0x142/0x5e0 arch/x86/kernel/apic/apic.c:1097
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711
 </IRQ>
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 sysvec_apic_timer_interrupt+0xe0/0x120 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:587
RIP: 0010:should_resched arch/x86/include/asm/preempt.h:102 [inline]
RIP: 0010:__local_bh_enable_ip+0x189/0x250 kernel/softirq.c:196
Code: 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 c4 00 00 00 48 83 3d 60 5a 6e 08 00 74 7b fb 66 0f 1f 44 00 00 <65> 8b 05 80 78 bb 7e 85 c0 74 6b 5b 5d 41 5c c3 80 3d a3 66 63 09
RSP: 0018:ffffc90008007c18 EFLAGS: 00000286
RAX: 1ffffffff1369c12 RBX: 0000000000000201 RCX: 0000000000000007
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffffffff81468609
RBP: ffffffff876c62b9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88804de80100
R13: ffffc90008007db8 R14: ffff88803a0f0000 R15: 0000000000000000
 spin_unlock_bh include/linux/spinlock.h:398 [inline]
 nl80211_netlink_notify net/wireless/nl80211.c:17308 [inline]
 nl80211_netlink_notify+0x649/0x970 net/wireless/nl80211.c:17260
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 __blocking_notifier_call_chain kernel/notifier.c:284 [inline]
 __blocking_notifier_call_chain kernel/notifier.c:271 [inline]
 blocking_notifier_call_chain kernel/notifier.c:295 [inline]
 blocking_notifier_call_chain+0x67/0x90 kernel/notifier.c:292
 netlink_release+0xc51/0x1cf0 net/netlink/af_netlink.c:774
 __sock_release+0xcd/0x280 net/socket.c:605
 sock_close+0x18/0x20 net/socket.c:1278
 __fput+0x33c/0x880 fs/file_table.c:281
 task_work_run+0xdd/0x190 kernel/task_work.c:135
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:239 [inline]
 __prepare_exit_to_usermode+0x1e9/0x1f0 arch/x86/entry/common.c:269
 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
BUG: unable to handle page fault for address: 0000000080010001
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 90895067 P4D 90895067 PUD 0 
Oops: 0002 [#3] PREEMPT SMP KASAN
CPU: 0 PID: 3600 Comm: syz-executor.4 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:in_gate_area_no_mm+0x0/0x6a arch/x86/entry/vsyscall/vsyscall_64.c:343
Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
RSP: 0018:ffffc90000006330 EFLAGS: 00010046
RAX: 0000000080010001 RBX: ffffc900000063d0 RCX: ffffffff816a6060
RDX: ffff88804de80100 RSI: ffffffff816a608b RDI: 0000000000415d51
RBP: 0000000000415d51 R08: ffffc900000064e0 R09: ffff8880ae624667
R10: 0000000000415d51 R11: 0000000000000001 R12: ffffc900000064e0
R13: 0000000000000001 R14: 0000000000415d51 R15: ffffc900000063f0
FS:  00007fd3b59ee700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000080010001 CR3: 0000000034049000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 is_kernel include/linux/kallsyms.h:44 [inline]
 is_ksym_addr include/linux/kallsyms.h:50 [inline]
 kallsyms_lookup+0xc3/0x2e0 kernel/kallsyms.c:290
 __sprint_symbol+0x9c/0x1c0 kernel/kallsyms.c:363
 symbol_string+0x14c/0x370 lib/vsprintf.c:969
 pointer+0x185/0x970 lib/vsprintf.c:2226
 vsnprintf+0x5b2/0x14f0 lib/vsprintf.c:2624
 vscnprintf+0x29/0x80 lib/vsprintf.c:2723
 printk_safe_log_store+0xf5/0x250 kernel/printk/printk_safe.c:94
 vprintk_safe kernel/printk/printk_safe.c:347 [inline]
 vprintk_func+0xef/0x1a6 kernel/printk/printk_safe.c:390
 printk+0xba/0xed kernel/printk/printk.c:2070
 show_ip+0x22/0x30 arch/x86/kernel/dumpstack.c:124
 show_iret_regs+0x10/0x32 arch/x86/kernel/dumpstack.c:131
 __show_regs+0x18/0x50 arch/x86/kernel/process_64.c:72
 show_trace_log_lvl+0x255/0x2b4 arch/x86/kernel/dumpstack.c:274
 show_regs arch/x86/kernel/dumpstack.c:447 [inline]
 __die_body arch/x86/kernel/dumpstack.c:393 [inline]
 __die+0x51/0x90 arch/x86/kernel/dumpstack.c:407
 no_context+0x56b/0x9f0 arch/x86/mm/fault.c:695
Lost 165 message(s)!

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/18 02:30 upstream 8882572675c1 9c812472 .config console log report ci-upstream-kasan-gce-root
2020/07/03 17:04 upstream cd77006e01b3 bed10395 .config console log report ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.