BUG: unable to handle kernel NULL pointer dereference in hide_cursor

15 views
Skip to first unread message

syzbot

unread,
Mar 4, 2021, 3:16:14 PM3/4/21
to gre...@linuxfoundation.org, jiri...@kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 5695e516 Merge tag 'io_uring-worker.v3-2021-02-25' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10bc7b96d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=e33ab2de74f48295
dashboard link: https://syzkaller.appspot.com/bug?extid=e28df1dcd2038f11d0f1
compiler: Debian clang version 11.0.1-2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=145911b0d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16123ff2d00000

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

BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 12e8c067 P4D 12e8c067 PUD 242de067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8335 Comm: syz-executor258 Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000dcf7aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffffff8a151c78 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143df0000 RDI: ffff888010879000
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff84048b55
R10: 0000000000000002 R11: ffff88801b115340 R12: dffffc0000000000
R13: 1ffff1100210f27c R14: ffff8880108793e0 R15: ffff888010879000
FS: 0000000000e5a300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000011d74000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hide_cursor+0x7e/0x310 drivers/tty/vt/vt.c:907
redraw_screen+0x190/0x11a0 drivers/tty/vt/vt.c:1012
vc_do_resize+0x1178/0x1780 drivers/tty/vt/vt.c:1325
fbcon_set_disp+0x9f2/0xf90 drivers/video/fbdev/core/fbcon.c:1402
con2fb_init_display drivers/video/fbdev/core/fbcon.c:808 [inline]
set_con2fb_map+0x7f6/0xe90 drivers/video/fbdev/core/fbcon.c:879
fbcon_set_con2fb_map_ioctl+0x19e/0x280 drivers/video/fbdev/core/fbcon.c:3010
do_fb_ioctl+0x307/0x6e0 drivers/video/fbdev/core/fbmem.c:1156
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43eed9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd3f7a18c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043eed9
RDX: 0000000020000040 RSI: 0000000000004610 RDI: 0000000000000004
RBP: 0000000000402ec0 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000402f50
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Modules linked in:
CR2: 0000000000000000
---[ end trace 867c96c33860cda9 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000dcf7aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffffff8a151c78 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143df0000 RDI: ffff888010879000
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff84048b55
R10: 0000000000000002 R11: ffff88801b115340 R12: dffffc0000000000
R13: 1ffff1100210f27c R14: ffff8880108793e0 R15: ffff888010879000
FS: 0000000000e5a300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000011d74000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Mar 11, 2021, 7:49:05 PM3/11/21
to syzkall...@googlegroups.com, yildiri...@gmail.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel NULL pointer dereference in hide_cursor

BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 22b36067 P4D 22b36067 PUD 22b35067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 10156 Comm: syz-executor.3 Not tainted 5.12.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000aaa7aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffffff8a151e78 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143cc6000 RDI: ffff888010079000
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff84045df5
R10: 0000000000000002 R11: ffff888023963780 R12: dffffc0000000000
R13: 1ffff1100200f27c R14: ffff8880100793e0 R15: ffff888010079000
FS: 00007f4a7709d700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000022b37000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hide_cursor+0x7e/0x310 drivers/tty/vt/vt.c:907
redraw_screen+0x190/0x11a0 drivers/tty/vt/vt.c:1012
vc_do_resize+0x1178/0x1780 drivers/tty/vt/vt.c:1325
fbcon_set_disp+0x9f2/0xf90 drivers/video/fbdev/core/fbcon.c:1402
con2fb_init_display drivers/video/fbdev/core/fbcon.c:808 [inline]
set_con2fb_map+0x7f6/0xe90 drivers/video/fbdev/core/fbcon.c:879
fbcon_set_con2fb_map_ioctl+0x19e/0x280 drivers/video/fbdev/core/fbcon.c:3010
do_fb_ioctl+0x307/0x6e0 drivers/video/fbdev/core/fbmem.c:1156
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x465ef9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4a7709d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056c008 RCX: 0000000000465ef9
RDX: 0000000020000040 RSI: 0000000000004610 RDI: 0000000000000004
RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c008
R13: 00007ffe346e6c6f R14: 00007f4a7709d300 R15: 0000000000022000
Modules linked in:
CR2: 0000000000000000
---[ end trace 35c0a72195e89790 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000aaa7aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffffffff8a151e78 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143cc6000 RDI: ffff888010079000
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff84045df5
R10: 0000000000000002 R11: ffff888023963780 R12: dffffc0000000000
R13: 1ffff1100200f27c R14: ffff8880100793e0 R15: ffff888010079000
FS: 00007f4a7709d700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000022b37000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit: 28806e4d Merge tag 'media/v5.12-2' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1607effad00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8fdb0bb1af7af882

syzbot

unread,
Mar 12, 2021, 7:36:10 PM3/12/21
to duch...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
BUG: unable to handle kernel NULL pointer dereference in hide_cursor

BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 13662067 P4D 13662067 PUD 1163c067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 10106 Comm: syz-executor.1 Not tainted 5.12.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000a847aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143ec6000 RDI: ffff888010079000
RBP: ffffffff8a153178 R08: 0000000000000000 R09: ffffffff84054e45
R10: 0000000000000002 R11: ffff888017a59bc0 R12: dffffc0000000000
R13: 1ffff1100200f27c R14: ffff8880100793e0 R15: ffff888010079000
FS: 00007f0967968700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000012417000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hide_cursor+0x89/0x320 drivers/tty/vt/vt.c:908
redraw_screen+0x190/0x11a0 drivers/tty/vt/vt.c:1014
vc_do_resize+0x1178/0x1780 drivers/tty/vt/vt.c:1327
fbcon_set_disp+0x9f2/0xf90 drivers/video/fbdev/core/fbcon.c:1402
con2fb_init_display drivers/video/fbdev/core/fbcon.c:808 [inline]
set_con2fb_map+0x7f6/0xe90 drivers/video/fbdev/core/fbcon.c:879
fbcon_set_con2fb_map_ioctl+0x19e/0x280 drivers/video/fbdev/core/fbcon.c:3010
do_fb_ioctl+0x307/0x6e0 drivers/video/fbdev/core/fbmem.c:1156
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x465ef9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0967968188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9
RDX: 0000000020000040 RSI: 0000000000004610 RDI: 0000000000000004
RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffc7f9471af R14: 00007f0967968300 R15: 0000000000022000
Modules linked in:
CR2: 0000000000000000
---[ end trace 7809ed8f87695d12 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc9000a847aa8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000007
RDX: 0000000000000002 RSI: ffff888143ec6000 RDI: ffff888010079000
RBP: ffffffff8a153178 R08: 0000000000000000 R09: ffffffff84054e45
R10: 0000000000000002 R11: ffff888017a59bc0 R12: dffffc0000000000
R13: 1ffff1100200f27c R14: ffff8880100793e0 R15: ffff888010079000
FS: 00007f0967968700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000012417000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


Tested on:

commit: f296bfd5 Merge tag 'nfs-for-5.12-2' of git://git.linux-nfs..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10281c62d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=6779fadcb75bc4f0
dashboard link: https://syzkaller.appspot.com/bug?extid=e28df1dcd2038f11d0f1
compiler: Debian clang version 11.0.1-2
patch: https://syzkaller.appspot.com/x/patch.diff?x=114c8c3ad00000

Reply all
Reply to author
Forward
0 new messages