================================================================== 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+0x19fb/0x1d60 drivers/video/fbdev/core/sysimgblt.c:24 Write of size 8 at addr ffffc90005339000 by task syz.2.405/7643 CPU: 0 UID: 0 PID: 7643 Comm: syz.2.405 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+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 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+0x19fb/0x1d60 drivers/video/fbdev/core/sysimgblt.c:24 drm_fbdev_shmem_defio_imageblit+0x20/0x130 drivers/gpu/drm/drm_fbdev_shmem.c:39 soft_cursor+0x524/0xa10 drivers/video/fbdev/core/softcursor.c:74 bit_cursor+0xcf1/0x14d0 drivers/video/fbdev/core/bitblit.c:372 fbcon_cursor+0x43c/0x5e0 drivers/video/fbdev/core/fbcon.c:1410 set_cursor drivers/tty/vt/vt.c:1010 [inline] set_cursor+0x1db/0x250 drivers/tty/vt/vt.c:1001 con_flush_chars drivers/tty/vt/vt.c:3848 [inline] con_write+0x8c/0xb0 drivers/tty/vt/vt.c:3779 do_output_char+0x63b/0x850 drivers/tty/n_tty.c:418 __process_echoes+0x21c/0xb10 drivers/tty/n_tty.c:697 commit_echoes+0x14c/0x210 drivers/tty/n_tty.c:750 n_tty_receive_char+0x3f5/0x600 drivers/tty/n_tty.c:1413 n_tty_receive_buf_standard+0x6b2/0x3090 drivers/tty/n_tty.c:1582 __receive_buf drivers/tty/n_tty.c:1616 [inline] n_tty_receive_buf_common+0x349/0x1930 drivers/tty/n_tty.c:1715 tty_ldisc_receive_buf+0xaa/0x1a0 drivers/tty/tty_buffer.c:394 paste_selection+0x4ca/0x790 drivers/tty/vt/selection.c:439 tioclinux+0x5a7/0x640 drivers/tty/vt/vt.c:3699 vt_ioctl+0x145d/0x3170 drivers/tty/vt/vt_ioctl.c:757 tty_ioctl+0x26a/0x1870 drivers/tty/tty_io.c:2782 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd815d9f559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd816bf5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fd816025fa0 RCX: 00007fd815d9f559 RDX: 0000200000000000 RSI: 000000000000541c RDI: 0000000000000004 RBP: 00007fd815e36b50 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd816026038 R14: 00007fd816025fa0 R15: 00007ffe2b264ba8 The buggy address belongs to a 0-page vmalloc region starting at 0xffffc90004f51000 allocated at drm_gem_shmem_vmap_locked+0x553/0x860 drivers/gpu/drm/drm_gem_shmem_helper.c:415 Memory state around the buggy address: ffffc90005338f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005338f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005339000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90005339080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90005339100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================