linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: unable to handle kernel paging request in imageblit
@ 2021-09-13  3:06 Hao Sun
  0 siblings, 0 replies; 2+ messages in thread
From: Hao Sun @ 2021-09-13  3:06 UTC (permalink / raw)
  To: dri-devel, linux-fbdev; +Cc: linux-kernel

Hello,

When using Healer to fuzz the Linux kernel, the following crash was triggered.

HEAD commit: ac08b1c68d1b Merge tag 'pci-v5.15-changes'
git tree: upstream
console output:
https://drive.google.com/file/d/1Vvyiebkb1BAbgnM8QXg4XeotLYE7Xrk6/view?usp=sharing
kernel config: https://drive.google.com/file/d/1qrJUXD8ZIeAkg-xojzDpp04v9MtQ8RR6/view?usp=sharing
C reproducer: https://drive.google.com/file/d/1p79Nwcx6l7pC0qLZnbHFvr5FLSR79x0J/view?usp=sharing
Syzlang reproducer:
https://drive.google.com/file/d/1MT6DvJG2lMonmimV6XbED-I_STFMvaFo/view?usp=sharing

If you fix this issue, please add the following tag to the commit:
Reported-by: Hao Sun <sunhao.th@gmail.com>

BUG: unable to handle page fault for address: ffffc90007731480
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 8c00067 P4D 8c00067 PUD 8d63067 PMD 1026f8067 PTE 0
Oops: 0002 [#1] PREEMPT SMP
CPU: 0 PID: 10837 Comm: syz-executor Not tainted 5.14.0+ #15
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
RIP: 0010:fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
RIP: 0010:sys_imageblit+0x48c/0x830 drivers/video/fbdev/core/sysimgblt.c:275
Code: 04 41 0f be 5d 00 83 fd 1f 0f 87 75 03 00 00 e8 5a d5 f9 fe 89
e9 8b 44 24 14 d3 fb 23 5c 24 08 41 23 04 9f 33 44 24 04 85 ed <41> 89
44 24 fc 75 b9 e8 38 d5 f9 fe 49 83 c5 01 bd 08 00 00 00 e8
RSP: 0018:ffffc9000928f890 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000007
RDX: 0000000000040000 RSI: ffffffff823dbcd6 RDI: ffffc9000928f9f0
RBP: 0000000000000007 R08: 0000000000000018 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000002 R12: ffffc90007731484
R13: ffff88810496f13c R14: ffffc90007731500 R15: ffffffff849e52c0
FS:  00007fef7bf33700(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90007731480 CR3: 000000001ef3e000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 drm_fb_helper_sys_imageblit+0x18/0x40 drivers/gpu/drm/drm_fb_helper.c:794
 drm_fbdev_fb_imageblit+0x4b/0xa0 drivers/gpu/drm/drm_fb_helper.c:2276
 bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:139 [inline]
 bit_putcs+0x33c/0x590 drivers/video/fbdev/core/bitblit.c:188
 fbcon_putcs+0x13f/0x1a0 drivers/video/fbdev/core/fbcon.c:1296
 do_update_region+0x163/0x230 drivers/tty/vt/vt.c:676
 invert_screen+0x105/0x280 drivers/tty/vt/vt.c:800
 highlight drivers/tty/vt/selection.c:57 [inline]
 clear_selection+0x48/0x60 drivers/tty/vt/selection.c:84
 vc_do_resize+0x60b/0x6f0 drivers/tty/vt/vt.c:1257
 fbcon_do_set_font+0x188/0x2a0 drivers/video/fbdev/core/fbcon.c:2397
 fbcon_set_font+0x333/0x450 drivers/video/fbdev/core/fbcon.c:2483
 con_font_set drivers/tty/vt/vt.c:4666 [inline]
 con_font_op+0x238/0x4b0 drivers/tty/vt/vt.c:4710
 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
 vt_ioctl+0xd05/0x1890 drivers/tty/vt/vt_ioctl.c:752
 tty_ioctl+0x114/0xb00 drivers/tty/tty_io.c:2805
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0xb6/0x100 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x34/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x46a9a9
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fef7bf32c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000078c0a0 RCX: 000000000046a9a9
RDX: 0000000020000080 RSI: 0000000000004b72 RDI: 0000000000000004
RBP: 00000000004e4042 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078c0a0
R13: 0000000000000000 R14: 000000000078c0a0 R15: 00007fff66610a60
Modules linked in:
Dumping ftrace buffer:
   (ftrace buffer empty)
CR2: ffffc90007731480
---[ end trace b77be2f6638c5c66 ]---
RIP: 0010:fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
RIP: 0010:sys_imageblit+0x48c/0x830 drivers/video/fbdev/core/sysimgblt.c:275
Code: 04 41 0f be 5d 00 83 fd 1f 0f 87 75 03 00 00 e8 5a d5 f9 fe 89
e9 8b 44 24 14 d3 fb 23 5c 24 08 41 23 04 9f 33 44 24 04 85 ed <41> 89
44 24 fc 75 b9 e8 38 d5 f9 fe 49 83 c5 01 bd 08 00 00 00 e8
RSP: 0018:ffffc9000928f890 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000007
RDX: 0000000000040000 RSI: ffffffff823dbcd6 RDI: ffffc9000928f9f0
RBP: 0000000000000007 R08: 0000000000000018 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000002 R12: ffffc90007731484
R13: ffff88810496f13c R14: ffffc90007731500 R15: ffffffff849e52c0
FS:  00007fef7bf33700(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90007731480 CR3: 000000001ef3e000 CR4: 0000000000750ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
----------------
Code disassembly (best guess):
   0: 04 41                add    $0x41,%al
   2: 0f be 5d 00          movsbl 0x0(%rbp),%ebx
   6: 83 fd 1f              cmp    $0x1f,%ebp
   9: 0f 87 75 03 00 00    ja     0x384
   f: e8 5a d5 f9 fe        callq  0xfef9d56e
  14: 89 e9                mov    %ebp,%ecx
  16: 8b 44 24 14          mov    0x14(%rsp),%eax
  1a: d3 fb                sar    %cl,%ebx
  1c: 23 5c 24 08          and    0x8(%rsp),%ebx
  20: 41 23 04 9f          and    (%r15,%rbx,4),%eax
  24: 33 44 24 04          xor    0x4(%rsp),%eax
  28: 85 ed                test   %ebp,%ebp
* 2a: 41 89 44 24 fc        mov    %eax,-0x4(%r12) <-- trapping instruction
  2f: 75 b9                jne    0xffffffea
  31: e8 38 d5 f9 fe        callq  0xfef9d56e
  36: 49 83 c5 01          add    $0x1,%r13
  3a: bd 08 00 00 00        mov    $0x8,%ebp
  3f: e8                    .byte 0xe8

^ permalink raw reply	[flat|nested] 2+ messages in thread

* BUG: unable to handle kernel paging request in imageblit
@ 2022-01-04 11:56 kvartet
  0 siblings, 0 replies; 2+ messages in thread
From: kvartet @ 2022-01-04 11:56 UTC (permalink / raw)
  To: dri-devel, linux-fbdev, linux-kernel, syzkaller-bugs; +Cc: sunhao.th

Hello,

When using Syzkaller to fuzz the latest Linux kernel, the following
crash was triggered.

HEAD commit: a7904a538933 Linux 5.16-rc6
git tree: upstream
console output: https://paste.ubuntu.com/p/Rvt9f7wByG/plain/
kernel config: https://paste.ubuntu.com/p/FDDNHDxtwz/plain/
C reproducer: https://paste.ubuntu.com/p/KzH8Wx9H9R/plain/
Syzlang reproducer: https://paste.ubuntu.com/p/cDfk6NK4S4/plain/

If you fix this issue, please add the following tag to the commit:
Reported-by: Yiru Xu <xyru1999@gmail.com>


BUG: unable to handle page fault for address: fffff520009cf200
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 13ffed067 P4D 13ffed067 PUD 10dba067 PMD 18fd2067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 19972 Comm: syz-executor.5 Not tainted 5.16.0-rc6 #9
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.13.0-1ubuntu1.1 04/01/2014
RIP: 0010:fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
RIP: 0010:sys_imageblit+0x650/0x13f0 drivers/video/fbdev/core/sysimgblt.c:275
Code: 03 38 d0 7c 08 84 d2 0f 85 44 0d 00 00 48 bf 00 00 00 00 00 fc
ff df 8b 44 24 30 23 03 8b 5c 24 20 31 c3 4c 89 f0 48 c1 e8 03 <0f> b6
14 38 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 01
RSP: 0018:ffffc9000324f330 EFLAGS: 00010216
RAX: 1ffff920009cf200 RBX: 0000000000000000 RCX: 0000000000000007
RDX: 0000000000000000 RSI: dffffc0000000000 RDI: dffffc0000000000
RBP: ffff8880198c4000 R08: ffffffff841fac07 R09: 000000000000001f
R10: 0000000000000005 R11: fffffbfff1b20a42 R12: 0000000000000007
R13: 000000000000094b R14: ffffc90004e79000 R15: ffffc90004e79004
FS:  00007f59ce6a3700(0000) GS:ffff888135c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff520009cf200 CR3: 000000010d39f000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 drm_fb_helper_sys_imageblit+0x1c/0x180 drivers/gpu/drm/drm_fb_helper.c:794
 drm_fbdev_fb_imageblit+0x179/0x260 drivers/gpu/drm/drm_fb_helper.c:2288
 bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:124 [inline]
 bit_putcs+0x8ed/0xd80 drivers/video/fbdev/core/bitblit.c:173
 fbcon_putcs+0x367/0x450 drivers/video/fbdev/core/fbcon.c:1277
 do_update_region+0x399/0x630 drivers/tty/vt/vt.c:676
 invert_screen+0x2a7/0x610 drivers/tty/vt/vt.c:800
 highlight drivers/tty/vt/selection.c:57 [inline]
 clear_selection drivers/tty/vt/selection.c:84 [inline]
 clear_selection+0x55/0x70 drivers/tty/vt/selection.c:80
 vc_do_resize+0xda8/0x10a0 drivers/tty/vt/vt.c:1257
 fbcon_do_set_font+0x472/0x770 drivers/video/fbdev/core/fbcon.c:1928
 fbcon_set_font+0x80f/0xa00 drivers/video/fbdev/core/fbcon.c:2014
 con_font_set drivers/tty/vt/vt.c:4666 [inline]
 con_font_op+0x73a/0xca0 drivers/tty/vt/vt.c:4710
 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
 vt_ioctl+0x1de9/0x2af0 drivers/tty/vt/vt_ioctl.c:752
 tty_ioctl+0xc80/0x1450 drivers/tty/tty_io.c:2805
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f59cfd3189d
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 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:00007f59ce6a2c28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f59cfe50f60 RCX: 00007f59cfd3189d
RDX: 0000000020000080 RSI: 0000000000004b72 RDI: 0000000000000005
RBP: 00007f59cfd9e00d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd4f88b4ff R14: 00007f59cfe50f60 R15: 00007f59ce6a2dc0
 </TASK>
Modules linked in:
CR2: fffff520009cf200
---[ end trace 4fd686b04a4d7413 ]---
RIP: 0010:fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
RIP: 0010:sys_imageblit+0x650/0x13f0 drivers/video/fbdev/core/sysimgblt.c:275
Code: 03 38 d0 7c 08 84 d2 0f 85 44 0d 00 00 48 bf 00 00 00 00 00 fc
ff df 8b 44 24 30 23 03 8b 5c 24 20 31 c3 4c 89 f0 48 c1 e8 03 <0f> b6
14 38 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 01
RSP: 0018:ffffc9000324f330 EFLAGS: 00010216
RAX: 1ffff920009cf200 RBX: 0000000000000000 RCX: 0000000000000007
RDX: 0000000000000000 RSI: dffffc0000000000 RDI: dffffc0000000000
RBP: ffff8880198c4000 R08: ffffffff841fac07 R09: 000000000000001f
R10: 0000000000000005 R11: fffffbfff1b20a42 R12: 0000000000000007
R13: 000000000000094b R14: ffffc90004e79000 R15: ffffc90004e79004
FS:  00007f59ce6a3700(0000) GS:ffff888135c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff520009cf200 CR3: 000000010d39f000 CR4: 0000000000350ee0
----------------
Code disassembly (best guess), 1 bytes skipped:
   0: 38 d0                cmp    %dl,%al
   2: 7c 08                jl     0xc
   4: 84 d2                test   %dl,%dl
   6: 0f 85 44 0d 00 00    jne    0xd50
   c: 48 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%rdi
  13: fc ff df
  16: 8b 44 24 30          mov    0x30(%rsp),%eax
  1a: 23 03                and    (%rbx),%eax
  1c: 8b 5c 24 20          mov    0x20(%rsp),%ebx
  20: 31 c3                xor    %eax,%ebx
  22: 4c 89 f0              mov    %r14,%rax
  25: 48 c1 e8 03          shr    $0x3,%rax
* 29: 0f b6 14 38          movzbl (%rax,%rdi,1),%edx <-- trapping instruction
  2d: 4c 89 f0              mov    %r14,%rax
  30: 83 e0 07              and    $0x7,%eax
  33: 83 c0 03              add    $0x3,%eax
  36: 38 d0                cmp    %dl,%al
  38: 7c 08                jl     0x42
  3a: 84 d2                test   %dl,%dl
  3c: 0f                    .byte 0xf
  3d: 85 01                test   %eax,(%rcx)

Best Regards,
Yiru

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-04 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  3:06 BUG: unable to handle kernel paging request in imageblit Hao Sun
2022-01-04 11:56 kvartet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).