================================================================== 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:374 [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+0x194b/0x1d60 drivers/video/fbdev/core/sysimgblt.c:24 Write of size 8 at addr ffffc90005501000 by task syz.0.739/9295 CPU: 0 UID: 0 PID: 9295 Comm: syz.0.739 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP 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:374 [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+0x194b/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 hide_cursor+0x87/0x230 drivers/tty/vt/vt.c:997 do_con_write+0x220c/0x4b10 drivers/tty/vt/vt.c:3420 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3780 do_output_char+0x63b/0x850 drivers/tty/n_tty.c:418 __process_echoes+0x21c/0xb10 drivers/tty/n_tty.c:697 flush_echoes drivers/tty/n_tty.c:785 [inline] __receive_buf drivers/tty/n_tty.c:1618 [inline] n_tty_receive_buf_common+0x462/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:3701 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:52 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f43ad3a9559 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:00007f43ae341028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f43ad625fa0 RCX: 00007f43ad3a9559 RDX: 0000200000000140 RSI: 000000000000541c RDI: 0000000000000003 RBP: 00007f43ad438136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f43ad626038 R14: 00007f43ad625fa0 R15: 00007ffccd1c9d58 The buggy address belongs to a 0-page vmalloc region starting at 0xffffc90005119000 allocated at drm_gem_shmem_vmap_locked+0x553/0x860 drivers/gpu/drm/drm_gem_shmem_helper.c:415 Memory state around the buggy address: ffffc90005500f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005500f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005501000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90005501080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90005501100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ================================================================== BUG: unable to handle page fault for address: ffffc90005501000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 1d400067 P4D 1d400067 PUD 1eab1067 PMD 299a1067 PTE 0 Oops: Oops: 0002 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 9295 Comm: syz.0.739 Tainted: G B L syzkaller #0 PREEMPT(full) Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline] RIP: 0010:fb_bitmap_2ppw drivers/video/fbdev/core/fb_imageblit.h:374 [inline] RIP: 0010:fb_bitmap_imageblit drivers/video/fbdev/core/fb_imageblit.h:462 [inline] RIP: 0010:fb_imageblit drivers/video/fbdev/core/fb_imageblit.h:492 [inline] RIP: 0010:sys_imageblit+0x1894/0x1d60 drivers/video/fbdev/core/sysimgblt.c:24 Code: 48 89 fa 48 c1 ea 03 80 3c 1a 00 0f 85 da 00 00 00 4c 89 f2 48 8b 84 c4 88 00 00 00 48 c1 ea 03 80 3c 1a 00 0f 85 aa 00 00 00 <49> 89 06 8b 3c 24 83 c5 01 41 c1 e4 02 89 ee 49 83 c6 08 e8 54 b6 RSP: 0018:ffffc90005b2f290 EFLAGS: 00010282 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffc900046aa000 RDX: 0000000000080000 RSI: ffffffff81c9d69d RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff95bfeb27 R11: 0000000000000000 R12: 0000000000000006 R13: ffffc90005b2f318 R14: ffffc90005501000 R15: ffffc90005501000 FS: 00007f43ae3416c0(0000) GS:ffff8880d4469000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90005501000 CR3: 0000000062b28000 CR4: 0000000000352ef0 Call Trace: 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 hide_cursor+0x87/0x230 drivers/tty/vt/vt.c:997 do_con_write+0x220c/0x4b10 drivers/tty/vt/vt.c:3420 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3780 do_output_char+0x63b/0x850 drivers/tty/n_tty.c:418 __process_echoes+0x21c/0xb10 drivers/tty/n_tty.c:697 flush_echoes drivers/tty/n_tty.c:785 [inline] __receive_buf drivers/tty/n_tty.c:1618 [inline] n_tty_receive_buf_common+0x462/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:3701 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:52 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f43ad3a9559 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:00007f43ae341028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f43ad625fa0 RCX: 00007f43ad3a9559 RDX: 0000200000000140 RSI: 000000000000541c RDI: 0000000000000003 RBP: 00007f43ad438136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f43ad626038 R14: 00007f43ad625fa0 R15: 00007ffccd1c9d58 Modules linked in: CR2: ffffc90005501000 ---[ end trace 0000000000000000 ]--- RIP: 0010:fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline] RIP: 0010:fb_bitmap_2ppw drivers/video/fbdev/core/fb_imageblit.h:374 [inline] RIP: 0010:fb_bitmap_imageblit drivers/video/fbdev/core/fb_imageblit.h:462 [inline] RIP: 0010:fb_imageblit drivers/video/fbdev/core/fb_imageblit.h:492 [inline] RIP: 0010:sys_imageblit+0x1894/0x1d60 drivers/video/fbdev/core/sysimgblt.c:24 Code: 48 89 fa 48 c1 ea 03 80 3c 1a 00 0f 85 da 00 00 00 4c 89 f2 48 8b 84 c4 88 00 00 00 48 c1 ea 03 80 3c 1a 00 0f 85 aa 00 00 00 <49> 89 06 8b 3c 24 83 c5 01 41 c1 e4 02 89 ee 49 83 c6 08 e8 54 b6 RSP: 0018:ffffc90005b2f290 EFLAGS: 00010282 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffc900046aa000 RDX: 0000000000080000 RSI: ffffffff81c9d69d RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff95bfeb27 R11: 0000000000000000 R12: 0000000000000006 R13: ffffc90005b2f318 R14: ffffc90005501000 R15: ffffc90005501000 FS: 00007f43ae3416c0(0000) GS:ffff8880d4469000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90005501000 CR3: 0000000062b28000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 48 89 fa mov %rdi,%rdx 3: 48 c1 ea 03 shr $0x3,%rdx 7: 80 3c 1a 00 cmpb $0x0,(%rdx,%rbx,1) b: 0f 85 da 00 00 00 jne 0xeb 11: 4c 89 f2 mov %r14,%rdx 14: 48 8b 84 c4 88 00 00 mov 0x88(%rsp,%rax,8),%rax 1b: 00 1c: 48 c1 ea 03 shr $0x3,%rdx 20: 80 3c 1a 00 cmpb $0x0,(%rdx,%rbx,1) 24: 0f 85 aa 00 00 00 jne 0xd4 * 2a: 49 89 06 mov %rax,(%r14) <-- trapping instruction 2d: 8b 3c 24 mov (%rsp),%edi 30: 83 c5 01 add $0x1,%ebp 33: 41 c1 e4 02 shl $0x2,%r12d 37: 89 ee mov %ebp,%esi 39: 49 83 c6 08 add $0x8,%r14 3d: e8 .byte 0xe8 3e: 54 push %rsp 3f: b6 .byte 0xb6