================================================================== 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:613 Read of size 256 at addr ffff8880921823c0 by task syz.5.2222/16132 CPU: 1 UID: 0 PID: 16132 Comm: syz.5.2222 Tainted: G U 6.15.0-rc7-syzkaller-00175-g0f8c0258bf04 #0 PREEMPT(full) Tainted: [U]=USER Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __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:613 fbcon_init+0xd77/0x1900 drivers/video/fbdev/core/fbcon.c:1145 visual_init+0x31d/0x620 drivers/tty/vt/vt.c:1011 do_bind_con_driver.isra.0+0x57a/0xbf0 drivers/tty/vt/vt.c:3831 vt_bind drivers/tty/vt/vt.c:3987 [inline] store_bind+0x61d/0x760 drivers/tty/vt/vt.c:4059 dev_attr_store+0x55/0x80 drivers/base/core.c:2440 sysfs_kf_write+0xef/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x354/0x510 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5bd/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe3ff58e969 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:00007fe400341038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fe3ff7b6320 RCX: 00007fe3ff58e969 RDX: 00000000fffffdef RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007fe3ff610ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fe3ff7b6320 R15: 00007fff14e3df58 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x92182 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 ffffea0002486090 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 7, migratetype Unmovable, gfp_mask 0x52dc0(GFP_KERNEL|__GFP_ZERO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 11397, tgid 11396 (syz.3.1223), ts 538691136469, free_ts 761226279449 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4974 __alloc_pages_noprof+0xb/0x1b0 mm/page_alloc.c:5008 __alloc_pages_node_noprof include/linux/gfp.h:284 [inline] alloc_pages_node_noprof include/linux/gfp.h:311 [inline] ___kmalloc_large_node+0x82/0x1e0 mm/slub.c:4271 __kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:4299 __do_kmalloc_node mm/slub.c:4315 [inline] __kvmalloc_node_noprof.cold+0xb/0x65 mm/slub.c:5012 kvmalloc_array_node_noprof include/linux/slab.h:1065 [inline] fq_init include/net/fq_impl.h:361 [inline] ieee80211_txq_setup_flows+0x19c/0xaf0 net/mac80211/tx.c:1587 ieee80211_register_hw+0x20dc/0x4140 net/mac80211/main.c:1528 mac80211_hwsim_new_radio+0x3034/0x54d0 drivers/net/wireless/virtual/mac80211_hwsim.c:5559 hwsim_new_radio_nl+0xb51/0x12c0 drivers/net/wireless/virtual/mac80211_hwsim.c:6243 genl_family_rcv_msg_doit+0x206/0x2f0 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x55c/0x800 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x16a/0x440 net/netlink/af_netlink.c:2534 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x53d/0x7f0 net/netlink/af_netlink.c:1339 page last free pid 53 tgid 53 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1258 [inline] __free_pages_ok+0x647/0xe70 mm/page_alloc.c:1434 __folio_put+0x329/0x450 mm/swap.c:112 fq_reset include/net/fq_impl.h:386 [inline] ieee80211_txq_teardown_flows+0x16f/0x280 net/mac80211/tx.c:1638 ieee80211_unregister_hw+0x5d/0x3a0 net/mac80211/main.c:1685 mac80211_hwsim_del_radio drivers/net/wireless/virtual/mac80211_hwsim.c:5665 [inline] hwsim_exit_net+0x3ac/0x7d0 drivers/net/wireless/virtual/mac80211_hwsim.c:6545 ops_exit_list+0xb3/0x180 net/core/net_namespace.c:172 cleanup_net+0x5c1/0xb30 net/core/net_namespace.c:654 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888092182280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888092182300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888092182380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888092182400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888092182480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================