================================================================== 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:133 [inline] BUG: KASAN: vmalloc-out-of-bounds in fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:219 [inline] BUG: KASAN: vmalloc-out-of-bounds in fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:278 [inline] BUG: KASAN: vmalloc-out-of-bounds in sys_fillrect+0x174a/0x1910 drivers/video/fbdev/core/sysfillrect.c:24 Write of size 8 at addr ffffc90005041000 by task syz.2.528/7960 CPU: 1 UID: 0 PID: 7960 Comm: syz.2.528 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1a0 mm/kasan/report.c:595 fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline] bitfill drivers/video/fbdev/core/fb_fillrect.h:133 [inline] fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:219 [inline] fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:278 [inline] sys_fillrect+0x174a/0x1910 drivers/video/fbdev/core/sysfillrect.c:24 drm_fbdev_shmem_defio_fillrect+0x22/0x140 drivers/gpu/drm/drm_fbdev_shmem.c:39 bit_clear+0x17d/0x220 drivers/video/fbdev/core/bitblit.c:73 __fbcon_clear+0x633/0x760 drivers/video/fbdev/core/fbcon.c:1326 fbcon_scroll+0x48b/0x650 drivers/video/fbdev/core/fbcon.c:1886 con_scroll+0x464/0x690 drivers/tty/vt/vt.c:588 csi_M drivers/tty/vt/vt.c:2140 [inline] csi_ECMA drivers/tty/vt/vt.c:2559 [inline] do_con_trol drivers/tty/vt/vt.c:2733 [inline] do_con_write+0x6888/0x8550 drivers/tty/vt/vt.c:3228 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3565 process_output_block drivers/tty/n_tty.c:557 [inline] n_tty_write+0x44f/0x12d0 drivers/tty/n_tty.c:2366 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write.isra.0+0x4d2/0x890 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6ac/0x1070 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xde/0x660 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf743d579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 2e 8d b4 26 00 00 00 00 8d b4 26 00 00 00 RSP: 002b:00000000f546650c EFLAGS: 00000292 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000080002100 RDX: 0000000000001006 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to a 0-page vmalloc region starting at 0xffffc90004d41000 allocated at drm_gem_shmem_vmap_locked+0x54b/0x800 drivers/gpu/drm/drm_gem_shmem_helper.c:411 Memory state around the buggy address: ffffc90005040f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005040f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005041000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90005041080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90005041100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 2e 8d b4 26 00 00 00 cs lea 0x0(%rsi,%riz,1),%esi 37: 00 38: 8d .byte 0x8d 39: b4 26 mov $0x26,%ah 3b: 00 00 add %al,(%rax)