================================================================== BUG: KASAN: stack-out-of-bounds in fb_write_offset drivers/video/fbdev/core/sysmem.h:30 [inline] BUG: KASAN: stack-out-of-bounds in fb_bitmap_2ppw drivers/video/fbdev/core/fb_imageblit.h:364 [inline] BUG: KASAN: stack-out-of-bounds in fb_bitmap_imageblit drivers/video/fbdev/core/fb_imageblit.h:462 [inline] BUG: KASAN: stack-out-of-bounds in fb_imageblit drivers/video/fbdev/core/fb_imageblit.h:492 [inline] BUG: KASAN: stack-out-of-bounds in sys_imageblit+0x1a6f/0x1e60 drivers/video/fbdev/core/sysimgblt.c:24 Write of size 8 at addr ffffc90005197b60 by task syz.1.5038/23050 CPU: 2 UID: 0 PID: 23050 Comm: syz.1.5038 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 invert_screen+0x1e4/0x590 drivers/tty/vt/vt.c:748 highlight drivers/tty/vt/selection.c:57 [inline] clear_selection drivers/tty/vt/selection.c:87 [inline] clear_selection+0x59/0x70 drivers/tty/vt/selection.c:83 vc_do_resize+0xd9b/0x10e0 drivers/tty/vt/vt.c:1195 vc_resize include/linux/vt_kern.h:49 [inline] fbcon_set_disp+0x7ad/0xe50 drivers/video/fbdev/core/fbcon.c:1430 con2fb_init_display drivers/video/fbdev/core/fbcon.c:828 [inline] set_con2fb_map+0x703/0x1080 drivers/video/fbdev/core/fbcon.c:902 fbcon_set_con2fb_map_ioctl+0x16c/0x220 drivers/video/fbdev/core/fbcon.c:3132 do_fb_ioctl+0x328/0x7e0 drivers/video/fbdev/core/fb_chrdev.c:138 fb_ioctl+0xe5/0x150 drivers/video/fbdev/core/fb_chrdev.c:169 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:584 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:0x7f251738ebe9 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:00007f251824e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f25175b5fa0 RCX: 00007f251738ebe9 RDX: 0000200000000180 RSI: 0000000000004610 RDI: 0000000000000003 RBP: 00007f2517411e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f25175b6038 R14: 00007f25175b5fa0 R15: 00007ffc70140d28 The buggy address belongs to a 8-page vmalloc region starting at 0xffffc90005190000 allocated at kernel_clone+0xfc/0x930 kernel/fork.c:2605 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x494e pfn:0x398fd flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 000000000000494e 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_ZERO|__GFP_NOWARN), pid 22190, tgid 22190 (syz.9.4788), ts 398014995071, free_ts 397206389153 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline] alloc_pages_noprof+0x131/0x390 mm/mempolicy.c:2507 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x72f/0x14b0 mm/vmalloc.c:3893 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:3956 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:882 [inline] copy_process+0x2c70/0x7690 kernel/fork.c:2004 kernel_clone+0xfc/0x930 kernel/fork.c:2605 __do_sys_clone3+0x212/0x290 kernel/fork.c:2909 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 page last free pid 59 tgid 59 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 vfree+0x1fd/0xb50 mm/vmalloc.c:3434 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:3353 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffffc90005197a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005197a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005197b00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc90005197b80: f1 f1 04 f2 00 00 f2 f2 00 00 00 f3 f3 f3 f3 f3 ffffc90005197c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================