BUG: unable to handle kernel NULL pointer dereference in __syscall_return_slowpath

2020-06-29 Thread syzbot
Hello,

syzbot found the following crash on:

HEAD commit:4e99b321 Merge tag 'nfs-for-5.8-2' of git://git.linux-nfs...
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=116abdd310
kernel config:  https://syzkaller.appspot.com/x/.config?x=bf3aec367b9ab569
dashboard link: https://syzkaller.appspot.com/bug?extid=95910cea1a7ad8850a0f
compiler:   gcc (GCC) 10.1.0-syz 20200507
userspace arch: i386
syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=1702075510

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+95910cea1a7ad8850...@syzkaller.appspotmail.com

BUG: kernel NULL pointer dereference, address: 000f
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 0 P4D 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8079 Comm: systemd-udevd Not tainted 5.8.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 
01/01/2011
RIP: 0010:__syscall_return_slowpath+0x0/0x280 arch/x86/entry/common.c:309
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:c90004cd7f38 EFLAGS: 00010283
RAX: 000f RBX: 0002 RCX: 
RDX: dc00 RSI: 81bc66f2 RDI: c90004cd7f58
RBP: c90004cd7f58 R08:  R09: 8880ae636cdb
R10:  R11:  R12: 
R13:  R14:  R15: 
FS:  7f934b3b78c0() GS:8880ae60() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 000f CR3: 8ebc4000 CR4: 001406f0
DR0:  DR1:  DR2: 
DR3:  DR6: fffe0ff0 DR7: 0400
Call Trace:
 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:368
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
BUG: kernel NULL pointer dereference, address: 
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 0 P4D 0 
Oops: 0002 [#2] PREEMPT SMP KASAN
CPU: 0 PID: 8079 Comm: systemd-udevd Not tainted 5.8.0-rc2-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:c90004cd7478 EFLAGS: 00010093
RAX:  RBX: c90004cd7518 RCX: 8169f800
RDX: 888091d90300 RSI: 8169f82b RDI: 7f934a4fe840
RBP: 7f934a4fe840 R08: c90004cd7628 R09: 8c8c8109
R10: 7f934a4fe840 R11:  R12: c90004cd7628
R13: 0001 R14: 7f934a4fe840 R15: c90004cd7538
FS:  7f934b3b78c0() GS:8880ae60() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2:  CR3: 8ebc4000 CR4: 001406f0
DR0:  DR1:  DR2: 
DR3:  DR6: fffe0ff0 DR7: 0400
Call Trace:
 is_kernel include/linux/kallsyms.h:43 [inline]
 is_ksym_addr include/linux/kallsyms.h:49 [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 arch/x86/mm/fault.c:1268 [inline]
 handle_page_fault arch/x86/mm/fault.c:1365 [inline]
 exc_page_fault+0xc29/0x14c0 arch/x86/mm/fault.c:1418
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:565
RIP: 0010:__syscall_return_slowpath+0x0/0x280 arch/x86/entry/common.c:309
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 

Re: BUG: unable to handle kernel NULL pointer dereference in __syscall_return_slowpath

2020-06-29 Thread Eric Biggers
On Mon, Jun 29, 2020 at 09:31:16AM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following crash on:
> 
> HEAD commit:4e99b321 Merge tag 'nfs-for-5.8-2' of git://git.linux-nfs...
> git tree:   upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=116abdd310
> kernel config:  https://syzkaller.appspot.com/x/.config?x=bf3aec367b9ab569
> dashboard link: https://syzkaller.appspot.com/bug?extid=95910cea1a7ad8850a0f
> compiler:   gcc (GCC) 10.1.0-syz 20200507
> userspace arch: i386
> syz repro:  https://syzkaller.appspot.com/x/repro.syz?x=1702075510

Looks like ioctl$FBIOPUT_VSCREENINFO on /dev/fb0 striking again.  There are like
20-30 open syzbot reports for this.

See https://lkml.kernel.org/lkml/ff323f05a0531...@google.com/T/#u
for some previous discussion.

#syz dup: general protection fault in syscall_return_slowpath