================================================================== BUG: KASAN: use-after-free in scr_memcpyw include/linux/vt_buffer.h:38 [inline] BUG: KASAN: use-after-free in fbcon_prepare_logo+0xa03/0xc70 drivers/video/fbdev/core/fbcon.c:646 Read of size 256 at addr ffff888043c563c0 by task syz.5.3548/22481 CPU: 0 UID: 0 PID: 22481 Comm: syz.5.3548 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 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 check_region_inline mm/kasan/generic.c:194 [inline] kasan_check_range+0x100/0x1b0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 scr_memcpyw include/linux/vt_buffer.h:38 [inline] fbcon_prepare_logo+0xa03/0xc70 drivers/video/fbdev/core/fbcon.c:646 fbcon_init+0xda0/0x1930 drivers/video/fbdev/core/fbcon.c:1179 visual_init+0x320/0x620 drivers/tty/vt/vt.c:1020 do_bind_con_driver.isra.0+0x57a/0xbf0 drivers/tty/vt/vt.c:3960 vt_bind drivers/tty/vt/vt.c:4116 [inline] store_bind+0x61d/0x760 drivers/tty/vt/vt.c:4188 dev_attr_store+0x58/0x80 drivers/base/core.c:2437 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:142 kernfs_fop_write_iter+0x3af/0x570 fs/kernfs/file.c:352 iter_file_splice_write+0xa24/0x12b0 fs/splice.c:738 do_splice_from fs/splice.c:938 [inline] direct_splice_actor+0x192/0x6c0 fs/splice.c:1161 splice_direct_to_actor+0x345/0xa30 fs/splice.c:1105 do_splice_direct_actor fs/splice.c:1204 [inline] do_splice_direct+0x174/0x240 fs/splice.c:1230 do_sendfile+0xb06/0xe50 fs/read_write.c:1370 __do_sys_sendfile64 fs/read_write.c:1431 [inline] __se_sys_sendfile64 fs/read_write.c:1417 [inline] __x64_sys_sendfile64+0x1d8/0x220 fs/read_write.c:1417 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7073f8f7c9 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:00007f7074e67038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f70741e6090 RCX: 00007f7073f8f7c9 RDX: 0000000000000000 RSI: 000000000000000a RDI: 0000000000000004 RBP: 00007f7074013f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f70741e6128 R14: 00007f70741e6090 R15: 00007ffcf2a68b28 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888043c56f00 pfn:0x43c56 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff888043c56f00 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 19553, tgid 19550 (syz.2.2907), ts 855080142810, free_ts 855480757526 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210 __alloc_pages_noprof mm/page_alloc.c:5244 [inline] alloc_pages_bulk_noprof+0x77a/0x1410 mm/page_alloc.c:5164 alloc_pages_bulk_mempolicy_noprof+0x244/0x12a0 mm/mempolicy.c:2794 vm_area_alloc_pages mm/vmalloc.c:3693 [inline] __vmalloc_area_node mm/vmalloc.c:3863 [inline] __vmalloc_node_range_noprof+0xb98/0x16b0 mm/vmalloc.c:4051 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4111 n_tty_open+0x1a/0x170 drivers/tty/n_tty.c:1890 tty_ldisc_open+0x9f/0x120 drivers/tty/tty_ldisc.c:432 tty_ldisc_setup+0x87/0x100 drivers/tty/tty_ldisc.c:755 tty_init_dev.part.0+0x1ec/0x500 drivers/tty/tty_io.c:1431 tty_init_dev+0x60/0x80 drivers/tty/tty_io.c:1397 ptmx_open drivers/tty/pty.c:799 [inline] ptmx_open+0x15e/0x3c0 drivers/tty/pty.c:765 chrdev_open+0x234/0x6a0 fs/char_dev.c:414 do_dentry_open+0x748/0x1590 fs/open.c:962 vfs_open+0x82/0x3f0 fs/open.c:1094 page last free pid 19550 tgid 19550 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943 vfree+0x1fd/0xb50 mm/vmalloc.c:3466 n_tty_close+0xcd/0x160 drivers/tty/n_tty.c:1873 tty_ldisc_close+0x114/0x1a0 drivers/tty/tty_ldisc.c:455 tty_ldisc_kill+0x8e/0x150 drivers/tty/tty_ldisc.c:613 tty_ldisc_hangup+0x365/0x730 drivers/tty/tty_ldisc.c:729 __tty_hangup.part.0+0x3fe/0x8c0 drivers/tty/tty_io.c:621 __tty_hangup drivers/tty/tty_io.c:688 [inline] tty_vhangup drivers/tty/tty_io.c:691 [inline] tty_vhangup+0x21/0x30 drivers/tty/tty_io.c:688 pty_close+0x3ca/0x540 drivers/tty/pty.c:77 tty_release+0x3af/0x1470 drivers/tty/tty_io.c:1745 __fput+0x402/0xb70 fs/file_table.c:468 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:44 [inline] exit_to_user_mode_loop+0xfb/0x540 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888043c56280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888043c56300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888043c56380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888043c56400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888043c56480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================