syzbot


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

Status: moderation: reported on 2025/04/20 00:29
Subsystems: fbdev
[Documentation on labels]
Reported-by: syzbot+cf4c73654b45ecbddefd@syzkaller.appspotmail.com
First crash: 31d, last: 2d07h

Sample crash report:
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline]
BUG: KASAN: vmalloc-out-of-bounds in bitfill drivers/video/fbdev/core/fb_fillrect.h:134 [inline]
BUG: KASAN: vmalloc-out-of-bounds in fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:220 [inline]
BUG: KASAN: vmalloc-out-of-bounds in fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:279 [inline]
BUG: KASAN: vmalloc-out-of-bounds in sys_fillrect+0x15d4/0x17b0 drivers/video/fbdev/core/sysfillrect.c:22
Write of size 8 at addr ffffc900037e9000 by task syz.1.6266/32049

CPU: 1 UID: 0 PID: 32049 Comm: syz.1.6266 Tainted: G     U              6.15.0-rc6-syzkaller-00052-g9f35e33144ae #0 PREEMPT(full) 
Tainted: [U]=USER
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:408 [inline]
 print_report+0xc3/0x670 mm/kasan/report.c:521
 kasan_report+0xe0/0x110 mm/kasan/report.c:634
 fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline]
 bitfill drivers/video/fbdev/core/fb_fillrect.h:134 [inline]
 fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:220 [inline]
 fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:279 [inline]
 sys_fillrect+0x15d4/0x17b0 drivers/video/fbdev/core/sysfillrect.c:22
 drm_fbdev_shmem_defio_fillrect+0x22/0x140 drivers/gpu/drm/drm_fbdev_shmem.c:37
 bit_clear+0x17a/0x220 drivers/video/fbdev/core/bitblit.c:73
 __fbcon_clear+0x600/0x780 drivers/video/fbdev/core/fbcon.c:1292
 fbcon_scroll+0x48b/0x690 drivers/video/fbdev/core/fbcon.c:1851
 con_scroll+0x45c/0x690 drivers/tty/vt/vt.c:579
 csi_M drivers/tty/vt/vt.c:2072 [inline]
 csi_ECMA drivers/tty/vt/vt.c:2483 [inline]
 do_con_trol drivers/tty/vt/vt.c:2657 [inline]
 do_con_write+0x6869/0x7c90 drivers/tty/vt/vt.c:3092
 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3432
 process_output_block drivers/tty/n_tty.c:561 [inline]
 n_tty_write+0x40f/0x1160 drivers/tty/n_tty.c:2377
 iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
 file_tty_write.constprop.0+0x502/0x9b0 drivers/tty/tty_io.c:1090
 tty_write drivers/tty/tty_io.c:1111 [inline]
 redirected_tty_write drivers/tty/tty_io.c:1134 [inline]
 redirected_tty_write+0xd4/0x150 drivers/tty/tty_io.c:1114
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x5bd/0x1180 fs/read_write.c:684
 ksys_write+0x12a/0x240 fs/read_write.c:736
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd6cc18e969
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd6cd02f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fd6cc3b6080 RCX: 00007fd6cc18e969
RDX: 0000000000000012 RSI: 0000200000000040 RDI: 0000000000000003
RBP: 00007fd6cc210ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fd6cc3b6080 R15: 00007ffd728f5078
 </TASK>

The buggy address ffffc900037e9000 belongs to a vmalloc virtual mapping
Memory state around the buggy address:
 ffffc900037e8f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc900037e8f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc900037e9000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                   ^
 ffffc900037e9080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc900037e9100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/14 22:12 upstream 9f35e33144ae a4fa04ef .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto KASAN: vmalloc-out-of-bounds Write in fillrect
2025/05/09 12:58 upstream 9c69f8884904 43803998 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto KASAN: vmalloc-out-of-bounds Write in fillrect
2025/04/16 00:23 upstream 1a1d569a75f3 a95239b1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: vmalloc-out-of-bounds Write in fillrect
* Struck through repros no longer work on HEAD.