syzbot


KASAN: vmalloc-out-of-bounds Write in sys_imageblit

Status: upstream: reported C repro on 2019/12/10 16:38
Reported-by: syzbot+26dc38a00dc05118a4e6@syzkaller.appspotmail.com
First crash: 1020d, last: 653d
Patch testing requests:
Created Duration User Patch Repo Result
2022/08/31 00:27 21m upstream OK log
2022/08/30 23:27 19m upstream OK log
2022/08/30 23:27 14m upstream report log

Sample crash report:
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
BUG: KASAN: vmalloc-out-of-bounds in sys_imageblit+0x1181/0x1240 drivers/video/fbdev/core/sysimgblt.c:275
Write of size 4 at addr ffffc90009c1b040 by task syz-executor.0/9196

CPU: 2 PID: 9196 Comm: syz-executor.0 Not tainted 5.7.0-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x188/0x20d lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0x5/0x413 mm/kasan/report.c:383
 __kasan_report mm/kasan/report.c:513 [inline]
 kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
 fast_imageblit drivers/video/fbdev/core/sysimgblt.c:229 [inline]
 sys_imageblit+0x1181/0x1240 drivers/video/fbdev/core/sysimgblt.c:275
 drm_fb_helper_sys_imageblit+0x1c/0x180 drivers/gpu/drm/drm_fb_helper.c:747
 bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:139 [inline]
 bit_putcs+0x8d0/0xd60 drivers/video/fbdev/core/bitblit.c:188
 fbcon_putcs+0x345/0x3f0 drivers/video/fbdev/core/fbcon.c:1362
 do_update_region+0x398/0x630 drivers/tty/vt/vt.c:683
 invert_screen+0x2a7/0x600 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+0xff3/0x1370 drivers/tty/vt/vt.c:1230
 fbcon_do_set_font+0x4a0/0x950 drivers/video/fbdev/core/fbcon.c:2608
 fbcon_set_font+0x732/0x870 drivers/video/fbdev/core/fbcon.c:2705
 con_font_set drivers/tty/vt/vt.c:4571 [inline]
 con_font_op+0xd65/0x1160 drivers/tty/vt/vt.c:4636
 vt_ioctl+0x1740/0x2640 drivers/tty/vt/vt_ioctl.c:980
 tty_ioctl+0xedc/0x1440 drivers/tty/tty_io.c:2656
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x11a/0x180 fs/ioctl.c:771
 __do_sys_ioctl fs/ioctl.c:780 [inline]
 __se_sys_ioctl fs/ioctl.c:778 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:778
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45c879
Code: 1d b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 eb b1 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fb46427fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000074bf00 RCX: 000000000045c879
RDX: 0000000020000080 RSI: 0000000000004b72 RDI: 0000000000000003
RBP: 00000000006fae40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb4642806d4
R13: 000000000000037a R14: 00000000006ecfc0 R15: 00000000004ace26


Memory state around the buggy address:
 ffffc90009c1af00: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
 ffffc90009c1af80: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
>ffffc90009c1b000: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
                                           ^
 ffffc90009c1b080: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
 ffffc90009c1b100: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
==================================================================

Crashes (91):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-qemu-upstream 2020/06/11 23:34 upstream 435faf5c218a 5c25fdab .config log report syz
ci-qemu-upstream-386 2020/10/07 07:41 upstream c85fb28b6f99 1880b4a9 .config log report syz C
ci-qemu-upstream-386 2020/10/07 05:27 upstream c85fb28b6f99 1880b4a9 .config log report syz
ci-qemu-upstream 2020/12/11 04:46 upstream 9fca90cf2892 f900b48c .config log report info
ci-qemu-upstream 2020/12/10 11:38 upstream a2f5ea9e314b 2a55c22b .config log report info
ci-qemu-upstream 2020/12/10 10:07 upstream a2f5ea9e314b 2a55c22b .config log report info
ci-qemu-upstream 2020/12/04 19:40 upstream e87297fa080a 20366b87 .config log report info
ci-qemu-upstream 2020/12/02 11:47 upstream 509a15421674 eff43e99 .config log report info
ci-qemu-upstream 2020/12/01 22:38 upstream b65054597872 07bfe8a5 .config log report info
ci-qemu-upstream 2020/11/10 07:55 upstream 407ab579637c cca87986 .config log report info
ci-qemu-upstream 2020/11/10 02:54 upstream 407ab579637c 64069d48 .config log report info
ci-qemu-upstream 2020/11/09 22:56 upstream f8394f232b1e 64069d48 .config log report info
ci-qemu-upstream 2020/11/05 15:24 upstream 4ef8451b3326 64069d48 .config log report info
ci-qemu-upstream 2020/10/23 19:14 upstream 0adc313c4f20 2bb6666c .config log report info
ci-qemu-upstream 2020/09/11 07:49 upstream fffe3ae0ee84 adfb8b4e .config log report
ci-qemu-upstream 2020/09/09 07:27 upstream fffe3ae0ee84 0ea7a887 .config log report
ci-qemu-upstream 2020/09/08 17:15 upstream fffe3ae0ee84 abf9ba4f .config log report
ci-qemu-upstream 2020/09/04 23:53 upstream fffe3ae0ee84 abf9ba4f .config log report
ci-qemu-upstream 2019/12/17 10:41 upstream ea200dec5128 2b31345f .config log report
ci-qemu-upstream 2019/12/10 15:24 upstream 6794862a16ef 4b83c8fb .config log report
ci-qemu-upstream-386 2020/12/11 22:50 upstream 94801e5c6d46 bca53db9 .config log report info
ci-qemu-upstream-386 2020/11/18 15:53 upstream 0fa8ee0d9ab9 09323409 .config log report info
ci-qemu-upstream-386 2020/11/02 20:55 upstream 495023e4e49e f7362256 .config log report info
ci-qemu-upstream-386 2020/10/27 22:18 upstream ed8780e3f2ec 96e03c1c .config log report info
ci-qemu-upstream-386 2020/10/18 12:53 upstream 9d9af1007bc0 fea47c01 .config log report info
ci-qemu-upstream-386 2020/10/18 01:42 upstream 9d9af1007bc0 fea47c01 .config log report info
ci-qemu-upstream-386 2020/10/13 06:56 upstream 1e6d1d96461e d32b0bbf .config log report info
ci-qemu-upstream-386 2020/10/13 02:00 upstream 1e6d1d96461e d32b0bbf .config log report info
ci-qemu-upstream-386 2020/10/12 22:03 upstream 1e6d1d96461e d32b0bbf .config log report info
ci-qemu-upstream-386 2020/10/11 19:35 upstream 3dd0130f2430 4a77ae0b .config log report info
ci-qemu-upstream-386 2020/10/11 15:52 upstream da690031a5d6 4a77ae0b .config log report info
ci-qemu-upstream-386 2020/10/11 02:06 upstream da690031a5d6 4a77ae0b .config log report info
ci-qemu-upstream-386 2020/10/09 22:33 upstream 8a5f78d98c26 93817d89 .config log report info
ci-qemu-upstream-386 2020/10/09 10:30 upstream 583090b1b823 fa79ed2a .config log report info
ci-qemu-upstream-386 2020/10/08 21:12 upstream 3d006ee42dde 92390980 .config log report info
ci-qemu-upstream-386 2020/10/08 11:01 upstream c85fb28b6f99 92390980 .config log report info
ci-qemu-upstream-386 2020/10/07 11:25 upstream c85fb28b6f99 1880b4a9 .config log report info
ci-qemu-upstream-386 2020/10/07 07:04 upstream c85fb28b6f99 1880b4a9 .config log report info
ci-qemu-upstream-386 2020/10/07 04:04 upstream c85fb28b6f99 1880b4a9 .config log report info
ci-qemu-upstream-386 2020/10/05 02:40 upstream 549738f15da0 5ef9c291 .config log report info
ci-qemu-upstream-386 2020/10/04 14:29 upstream 22fbc037cd32 5ef9c291 .config log report info
ci-qemu-upstream-386 2020/10/04 03:00 upstream 22fbc037cd32 1a3f9408 .config log report info
ci-qemu-upstream-386 2020/09/30 06:51 upstream 02de58b24d2e 8516f6d3 .config log report info
ci-qemu-upstream-386 2020/09/28 22:41 upstream a4d63c3732f1 1b88c6d5 .config log report info
ci-qemu-upstream-386 2020/09/06 15:12 upstream dd9fb9bb3340 abf9ba4f .config log report
ci-qemu-upstream-386 2020/09/04 04:40 upstream e28f0104343d abf9ba4f .config log report
ci-qemu-upstream-386 2020/08/25 20:46 upstream abb3438d69fb 344da168 .config log report
* Struck through repros no longer work on HEAD.