================================================================== BUG: KASAN: stack-out-of-bounds in fast_imageblit drivers/video/fbdev/core/sysimgblt.c:257 [inline] BUG: KASAN: stack-out-of-bounds in sys_imageblit+0x1e04/0x2740 drivers/video/fbdev/core/sysimgblt.c:323 Write of size 4 at addr ffffc90003fb7d00 by task syz-executor.2/7685 CPU: 0 PID: 7685 Comm: syz-executor.2 Not tainted 5.19.0-rc7-syzkaller-00135-g68e77ffbfd06 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:313 print_report+0xf4/0x210 mm/kasan/report.c:429 kasan_report+0xfb/0x130 mm/kasan/report.c:491 fast_imageblit drivers/video/fbdev/core/sysimgblt.c:257 [inline] sys_imageblit+0x1e04/0x2740 drivers/video/fbdev/core/sysimgblt.c:323 drm_fb_helper_sys_imageblit drivers/gpu/drm/drm_fb_helper.c:825 [inline] drm_fbdev_fb_imageblit+0x163/0x300 drivers/gpu/drm/drm_fb_helper.c:2328 bit_putcs+0x19b9/0x1ed0 fbcon_putcs+0x347/0x520 drivers/video/fbdev/core/fbcon.c:1285 do_update_region+0x530/0x740 drivers/tty/vt/vt.c:676 invert_screen+0x48e/0xef0 drivers/tty/vt/vt.c:800 highlight drivers/tty/vt/selection.c:57 [inline] clear_selection+0x55/0x70 drivers/tty/vt/selection.c:84 vc_do_resize+0x724/0x18c0 drivers/tty/vt/vt.c:1257 fbcon_do_set_font+0xac5/0x1330 drivers/video/fbdev/core/fbcon.c:2431 fbcon_set_font+0xc29/0xf70 drivers/video/fbdev/core/fbcon.c:2522 con_font_set drivers/tty/vt/vt.c:4666 [inline] con_font_op+0xbe8/0x1070 drivers/tty/vt/vt.c:4710 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline] vt_ioctl+0x172e/0x1d00 drivers/tty/vt/vt_ioctl.c:752 tty_ioctl+0x874/0xc60 drivers/tty/tty_io.c:2778 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f2097c89209 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2098ebf168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2097d9bf60 RCX: 00007f2097c89209 RDX: 0000000020000040 RSI: 0000000000004b72 RDI: 0000000000000003 RBP: 00007f2097ce3161 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd0de902df R14: 00007f2098ebf300 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc90003fb0000, ffffc90003fb9000) created by: dup_task_struct+0x8b/0x490 kernel/fork.c:977 The buggy address belongs to the physical page: page:ffffea00007a5680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e95a flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 6685364755, free_ts 0 prep_new_page mm/page_alloc.c:2456 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4198 __alloc_pages+0x259/0x560 mm/page_alloc.c:5426 vm_area_alloc_pages mm/vmalloc.c:2927 [inline] __vmalloc_area_node mm/vmalloc.c:2995 [inline] __vmalloc_node_range+0x904/0x12e0 mm/vmalloc.c:3165 alloc_thread_stack_node+0x307/0x500 kernel/fork.c:312 dup_task_struct+0x8b/0x490 kernel/fork.c:977 copy_process+0x637/0x3fa0 kernel/fork.c:2071 kernel_clone+0x22f/0x7a0 kernel/fork.c:2655 kernel_thread+0x150/0x1d0 kernel/fork.c:2708 create_kthread kernel/kthread.c:399 [inline] kthreadd+0x5bc/0x790 kernel/kthread.c:745 ret_from_fork+0x1f/0x30 page_owner free stack trace missing Memory state around the buggy address: ffffc90003fb7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003fb7c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003fb7d00: f1 f1 f1 f1 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 ^ ffffc90003fb7d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003fb7e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================