================================================================== 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 bitfill drivers/video/fbdev/core/fb_fillrect.h:133 [inline] BUG: KASAN: stack-out-of-bounds in fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:219 [inline] BUG: KASAN: stack-out-of-bounds in fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:278 [inline] BUG: KASAN: stack-out-of-bounds in sys_fillrect+0x15d4/0x17b0 drivers/video/fbdev/core/sysfillrect.c:24 Write of size 8 at addr ffffc900052dfc20 by task syz.4.4288/26815 CPU: 1 UID: 0 PID: 26815 Comm: syz.4.4288 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] bitfill drivers/video/fbdev/core/fb_fillrect.h:133 [inline] fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:219 [inline] fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:278 [inline] sys_fillrect+0x15d4/0x17b0 drivers/video/fbdev/core/sysfillrect.c:24 drm_fbdev_shmem_defio_fillrect+0x22/0x140 drivers/gpu/drm/drm_fbdev_shmem.c:38 bit_clear+0x17d/0x220 drivers/video/fbdev/core/bitblit.c:73 __fbcon_clear+0x603/0x720 drivers/video/fbdev/core/fbcon.c:1303 fbcon_scroll+0x48b/0x640 drivers/video/fbdev/core/fbcon.c:1863 con_scroll+0x45f/0x690 drivers/tty/vt/vt.c:588 csi_M drivers/tty/vt/vt.c:2140 [inline] csi_ECMA drivers/tty/vt/vt.c:2559 [inline] do_con_trol drivers/tty/vt/vt.c:2733 [inline] do_con_write+0x5575/0x8290 drivers/tty/vt/vt.c:3228 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3565 process_output_block drivers/tty/n_tty.c:561 [inline] n_tty_write+0x41e/0x11e0 drivers/tty/n_tty.c:2377 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write.constprop.0+0x503/0x9b0 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x7d3/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/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3b04b8efc9 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:00007f3b05a66038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3b04de5fa0 RCX: 00007f3b04b8efc9 RDX: 0000000000001006 RSI: 0000200000002100 RDI: 0000000000000004 RBP: 00007f3b04c11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3b04de6038 R14: 00007f3b04de5fa0 R15: 00007fff17ee65f8 The buggy address belongs to a vmalloc virtual mapping The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804c7c7f00 pfn:0x4c7c7 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88804c7c7f00 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 13, tgid 13 (kworker/u32:1), ts 221580894500, free_ts 220833425413 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183 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:3647 [inline] __vmalloc_area_node mm/vmalloc.c:3724 [inline] __vmalloc_node_range_noprof+0x6f8/0x1480 mm/vmalloc.c:3897 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:3960 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:881 [inline] copy_process+0x2c77/0x76a0 kernel/fork.c:2012 kernel_clone+0xfc/0x930 kernel/fork.c:2609 user_mode_thread+0xc8/0x110 kernel/fork.c:2685 call_usermodehelper_exec_sync kernel/umh.c:132 [inline] call_usermodehelper_exec_work+0x6b/0x170 kernel/umh.c:163 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 16234 tgid 16215 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906 vfree+0x1fd/0xb50 mm/vmalloc.c:3440 bpf_check+0x88b/0xb710 kernel/bpf/verifier.c:24778 bpf_prog_load+0x112e/0x2850 kernel/bpf/syscall.c:3077 __sys_bpf+0x3e72/0x4980 kernel/bpf/syscall.c:6149 __do_sys_bpf kernel/bpf/syscall.c:6259 [inline] __se_sys_bpf kernel/bpf/syscall.c:6257 [inline] __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:6257 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900052dfb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900052dfb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900052dfc00: 00 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 00 00 f2 f2 ^ ffffc900052dfc80: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ffffc900052dfd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================