================================================================== BUG: KASAN: slab-use-after-free in scr_memcpyw include/linux/vt_buffer.h:38 [inline] BUG: KASAN: slab-use-after-free in fbcon_prepare_logo+0xa03/0xc70 drivers/video/fbdev/core/fbcon.c:618 Read of size 14 at addr ffff888060458dbe by task syz.4.2478/17433 CPU: 1 UID: 0 PID: 17433 Comm: syz.4.2478 Not tainted 6.16.0-rc1-syzkaller-00010-g2c4a1f3fe03e #0 PREEMPT(full) 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+0xcd/0x680 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+0x100/0x1b0 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:618 fbcon_init+0xd77/0x1900 drivers/video/fbdev/core/fbcon.c:1150 visual_init+0x320/0x620 drivers/tty/vt/vt.c:1019 do_bind_con_driver.isra.0+0x57a/0xbf0 drivers/tty/vt/vt.c:3915 vt_bind drivers/tty/vt/vt.c:4071 [inline] store_bind+0x61d/0x760 drivers/tty/vt/vt.c:4143 dev_attr_store+0x58/0x80 drivers/base/core.c:2440 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x351/0x510 fs/kernfs/file.c:334 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 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/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff6be58e929 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:00007ff6bf3ab038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff6be7b6080 RCX: 00007ff6be58e929 RDX: 00000000fffffdef RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ff6be610b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff6be7b6080 R15: 00007ffd7ff92018 Allocated by task 17325: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] alloc_workqueue_attrs kernel/workqueue.c:4636 [inline] __alloc_workqueue+0xda2/0x1810 kernel/workqueue.c:5690 alloc_workqueue+0xd2/0x200 kernel/workqueue.c:5788 tipc_topsrv_work_start net/tipc/topsrv.c:635 [inline] tipc_topsrv_start net/tipc/topsrv.c:679 [inline] tipc_topsrv_init_net+0x423/0x9e0 net/tipc/topsrv.c:725 ops_init+0x1df/0x5f0 net/core/net_namespace.c:138 setup_net+0x1ff/0x510 net/core/net_namespace.c:442 copy_net_ns+0x2a6/0x5f0 net/core/net_namespace.c:574 create_new_namespaces+0x3ea/0xa90 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:218 ksys_unshare+0x45b/0xa40 kernel/fork.c:3121 __do_sys_unshare kernel/fork.c:3192 [inline] __se_sys_unshare kernel/fork.c:3190 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3190 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 0: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4842 free_workqueue_attrs kernel/workqueue.c:4620 [inline] rcu_free_wq+0xe3/0x180 kernel/workqueue.c:4905 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff888060458d80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 62 bytes inside of freed 64-byte region [ffff888060458d80, ffff888060458dc0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60458 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b4418c0 ffffea0000a0cbc0 dead000000000004 raw: 0000000000000000 0000000080200020 00000000f5000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5836, tgid 5836 (syz-executor), ts 92435433667, free_ts 32117121103 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4354 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] sctp_inet6addr_event+0x47d/0x910 net/sctp/ipv6.c:86 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 atomic_notifier_call_chain+0x71/0x1c0 kernel/notifier.c:223 ipv6_add_addr+0x1388/0x1fe0 net/ipv6/addrconf.c:1181 add_addr+0xde/0x350 net/ipv6/addrconf.c:3200 add_v4_addrs+0x64b/0x990 net/ipv6/addrconf.c:3262 addrconf_sit_config net/ipv6/addrconf.c:3514 [inline] addrconf_init_auto_addrs+0x552/0x8f0 net/ipv6/addrconf.c:3557 addrconf_notify+0xe93/0x19e0 net/ipv6/addrconf.c:3744 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 __free_pages mm/page_alloc.c:5071 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:6927 destroy_args+0x7f6/0xa60 mm/debug_vm_pgtable.c:1009 debug_vm_pgtable+0x13b8/0x2d00 mm/debug_vm_pgtable.c:1389 do_one_initcall+0x120/0x6e0 init/main.c:1273 do_initcall_level init/main.c:1335 [inline] do_initcalls init/main.c:1351 [inline] do_basic_setup init/main.c:1370 [inline] kernel_init_freeable+0x5c2/0x900 init/main.c:1583 kernel_init+0x1c/0x2b0 init/main.c:1473 ret_from_fork+0x5d4/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: ffff888060458c80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff888060458d00: 00 00 00 00 00 02 fc fc fc fc fc fc fc fc fc fc >ffff888060458d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888060458e00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ffff888060458e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================