================================================================== 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 fb_bitmap_2ppw drivers/video/fbdev/core/fb_imageblit.h:364 [inline] BUG: KASAN: vmalloc-out-of-bounds in fb_bitmap_imageblit drivers/video/fbdev/core/fb_imageblit.h:462 [inline] BUG: KASAN: vmalloc-out-of-bounds in fb_imageblit drivers/video/fbdev/core/fb_imageblit.h:492 [inline] BUG: KASAN: vmalloc-out-of-bounds in sys_imageblit+0x1a6f/0x1e60 drivers/video/fbdev/core/sysimgblt.c:24 Write of size 8 at addr ffffc900050f1000 by task syz.2.390/7433 CPU: 1 UID: 0 PID: 7433 Comm: syz.2.390 Not tainted syzkaller #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: __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:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline] fb_bitmap_2ppw drivers/video/fbdev/core/fb_imageblit.h:364 [inline] fb_bitmap_imageblit drivers/video/fbdev/core/fb_imageblit.h:462 [inline] fb_imageblit drivers/video/fbdev/core/fb_imageblit.h:492 [inline] sys_imageblit+0x1a6f/0x1e60 drivers/video/fbdev/core/sysimgblt.c:24 drm_fbdev_shmem_defio_imageblit+0x20/0x130 drivers/gpu/drm/drm_fbdev_shmem.c:38 bit_putcs_unaligned drivers/video/fbdev/core/bitblit.c:138 [inline] bit_putcs+0x90f/0xde0 drivers/video/fbdev/core/bitblit.c:187 fbcon_putcs+0x384/0x4a0 drivers/video/fbdev/core/fbcon.c:1327 do_update_region+0x2e6/0x3f0 drivers/tty/vt/vt.c:627 csi_J+0x545/0xad0 drivers/tty/vt/vt.c:1536 reset_terminal+0x64e/0x770 drivers/tty/vt/vt.c:2204 handle_esc drivers/tty/vt/vt.c:2387 [inline] do_con_trol drivers/tty/vt/vt.c:2594 [inline] do_con_write+0x2f9c/0x8280 drivers/tty/vt/vt.c:3174 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3516 process_output_block drivers/tty/n_tty.c:561 [inline] n_tty_write+0x41f/0x11e0 drivers/tty/n_tty.c:2377 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write.constprop.0+0x504/0x9b0 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x7d0/0x11d0 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc8fdb8ebe9 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:00007fc8fbdee038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fc8fddb5fa0 RCX: 00007fc8fdb8ebe9 RDX: 0000000000001006 RSI: 00002000000009c0 RDI: 0000000000000005 RBP: 00007fc8fdc11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc8fddb6038 R14: 00007fc8fddb5fa0 R15: 00007ffc5a55fb88 The buggy address belongs to a 0-page vmalloc region starting at 0xffffc90004df1000 allocated at drm_gem_shmem_vmap_locked+0x561/0x7e0 drivers/gpu/drm/drm_gem_shmem_helper.c:371 Memory state around the buggy address: ffffc900050f0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900050f0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900050f1000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc900050f1080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc900050f1100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================