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: 6d18h, last: 6d18h

Sample crash report:
SELinux: unrecognized netlink message: protocol=4 nlmsg_type=0 sclass=netlink_tcpdiag_socket pid=12055 comm=syz.2.1811
==================================================================
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 ffffc90005111000 by task syz.2.1811/12055

CPU: 2 UID: 0 PID: 12055 Comm: syz.2.1811 Not tainted 6.15.0-rc2-syzkaller-00042-g1a1d569a75f3 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
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_margins+0x2f4/0x4c0 drivers/video/fbdev/core/bitblit.c:231
 fbcon_clear_margins.constprop.0+0x1d0/0x290 drivers/video/fbdev/core/fbcon.c:1320
 fbcon_switch+0xa01/0x14c0 drivers/video/fbdev/core/fbcon.c:2191
 redraw_screen+0x2be/0x760 drivers/tty/vt/vt.c:957
 fbcon_set_disp+0x7d4/0xe40 drivers/video/fbdev/core/fbcon.c:1413
 con2fb_init_display drivers/video/fbdev/core/fbcon.c:811 [inline]
 set_con2fb_map+0x703/0x1060 drivers/video/fbdev/core/fbcon.c:884
 fbcon_set_con2fb_map_ioctl+0x16c/0x220 drivers/video/fbdev/core/fbcon.c:3113
 do_fb_ioctl+0x328/0x7e0 drivers/video/fbdev/core/fb_chrdev.c:138
 fb_ioctl+0xe5/0x150 drivers/video/fbdev/core/fb_chrdev.c:169
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl fs/ioctl.c:892 [inline]
 __x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd11b58e169
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:00007fd11c353038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fd11b7b5fa0 RCX: 00007fd11b58e169
RDX: 00002000000000c0 RSI: 0000000000004610 RDI: 0000000000000048
RBP: 00007fd11b610a68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fd11b7b5fa0 R15: 00007fffd5c9ef58
 </TASK>

The buggy address belongs to the virtual mapping at
 [ffffc90004e11000, ffffc90005112000) created by:
 drm_gem_shmem_vmap+0x334/0x790 drivers/gpu/drm/drm_gem_shmem_helper.c:365

Memory state around the buggy address:
 ffffc90005110f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90005110f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90005111000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                   ^
 ffffc90005111080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90005111100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.