================================================================== 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:140 [inline] BUG: KASAN: stack-out-of-bounds in fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:220 [inline] BUG: KASAN: stack-out-of-bounds in fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:279 [inline] BUG: KASAN: stack-out-of-bounds in sys_fillrect+0x15ad/0x17b0 drivers/video/fbdev/core/sysfillrect.c:24 Write of size 8 at addr ffffc9000548fc98 by task syz.0.2917/14972 CPU: 3 UID: 0 PID: 14972 Comm: syz.0.2917 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:140 [inline] fb_fillrect_static drivers/video/fbdev/core/fb_fillrect.h:220 [inline] fb_fillrect drivers/video/fbdev/core/fb_fillrect.h:279 [inline] sys_fillrect+0x15ad/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/0x780 drivers/video/fbdev/core/fbcon.c:1310 fbcon_scroll+0x48b/0x690 drivers/video/fbdev/core/fbcon.c:1870 con_scroll+0x45c/0x690 drivers/tty/vt/vt.c:587 csi_M drivers/tty/vt/vt.c:2092 [inline] csi_ECMA drivers/tty/vt/vt.c:2504 [inline] do_con_trol drivers/tty/vt/vt.c:2678 [inline] do_con_write+0x5560/0x8280 drivers/tty/vt/vt.c:3174 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3516 process_output_block drivers/tty/n_tty.c:561 [inline] n_tty_write+0x41c/0x11e0 drivers/tty/n_tty.c:2377 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write.constprop.0+0x504/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/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0671f8eec9 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:00007f0672de5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f06721e5fa0 RCX: 00007f0671f8eec9 RDX: 0000000000001006 RSI: 0000200000000000 RDI: 0000000000000004 RBP: 00007f0672011f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f06721e6038 R14: 00007f06721e5fa0 R15: 00007ffca8fd0808 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:0x0 pfn:0x33a3e 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_ZERO|__GFP_NOWARN), pid 2, tgid 2 (kthreadd), ts 84160392383, free_ts 76905367061 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:881 [inline] copy_process+0x2c70/0x7690 kernel/fork.c:2004 kernel_clone+0xfc/0x930 kernel/fork.c:2605 kernel_thread+0xd4/0x120 kernel/fork.c:2667 create_kthread kernel/kthread.c:486 [inline] kthreadd+0x503/0x800 kernel/kthread.c:846 ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 7437 tgid 7436 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 snd_dma_free_pages+0x54/0x70 sound/core/memalloc.c:132 do_free_pages sound/core/pcm_memory.c:88 [inline] do_free_pages sound/core/pcm_memory.c:83 [inline] snd_pcm_lib_free_pages+0x172/0x390 sound/core/pcm_memory.c:495 do_hw_free sound/core/pcm_native.c:906 [inline] snd_pcm_release_substream.part.0+0x2a8/0x340 sound/core/pcm_native.c:2730 snd_pcm_release_substream+0x5b/0x70 sound/core/pcm_native.c:2724 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2397 [inline] snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2389 [inline] snd_pcm_oss_release+0x135/0x310 sound/core/oss/pcm_oss.c:2576 __fput+0x3ff/0xb70 fs/file_table.c:468 task_work_run+0x150/0x240 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x86f/0x2bf0 kernel/exit.c:961 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 get_signal+0x2673/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x84/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x41c/0x4e0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000548fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000548fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000548fc80: 00 00 00 f1 f1 f1 f1 f1 f1 04 f2 00 00 f2 f2 00 ^ ffffc9000548fd00: 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 ffffc9000548fd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================