================================================================== BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:642 [inline] BUG: KASAN: use-after-free in string+0x204/0x290 lib/vsprintf.c:724 Read of size 1 at addr ffff888020dab8c0 by task syz.3.392/5746 CPU: 0 PID: 5746 Comm: syz.3.392 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 string_nocheck lib/vsprintf.c:642 [inline] string+0x204/0x290 lib/vsprintf.c:724 vsnprintf+0x10db/0x1c20 lib/vsprintf.c:2811 seq_vprintf fs/seq_file.c:407 [inline] seq_printf+0x185/0x280 fs/seq_file.c:422 show_interrupts+0x9ab/0xba0 kernel/irq/proc.c:527 seq_read_iter+0x8af/0xc50 fs/seq_file.c:272 proc_reg_read_iter+0x1a9/0x270 fs/proc/inode.c:300 call_read_iter include/linux/fs.h:2173 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x75e/0xd50 fs/read_write.c:485 ksys_read+0x153/0x260 fs/read_write.c:623 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe6d6a13559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe6d4c28028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fe6d6c9a180 RCX: 00007fe6d6a13559 RDX: 0000000000002020 RSI: 0000200000001200 RDI: 0000000000000005 RBP: 00007fe6d6aaab50 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe6d6c9a218 R14: 00007fe6d6c9a180 R15: 00007ffd09a68ff8 Allocated by task 1: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kvasprintf+0xe3/0x1a0 lib/kasprintf.c:25 kasprintf+0xdf/0x130 lib/kasprintf.c:59 uart_add_one_port+0x3af/0x1d10 drivers/tty/serial/serial_core.c:2962 serial8250_register_8250_port+0x137f/0x1a80 drivers/tty/serial/8250/8250_core.c:1094 serial_pnp_probe+0x569/0x740 drivers/tty/serial/8250/8250_pnp.c:482 pnp_device_probe+0x2bc/0x470 drivers/pnp/driver.c:111 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __driver_attach+0x45d/0x660 drivers/base/dd.c:1184 bus_for_each_dev+0x182/0x1f0 drivers/base/bus.c:303 bus_add_driver+0x324/0x5d0 drivers/base/bus.c:620 driver_register+0x32d/0x430 drivers/base/driver.c:240 serial8250_init+0x96/0x170 drivers/tty/serial/8250/8250_core.c:1190 do_one_initcall+0x272/0x730 init/main.c:1276 do_initcall_level+0x13d/0x1f0 init/main.c:1349 do_initcalls+0x4b/0x90 init/main.c:1365 kernel_init_freeable+0x3d5/0x560 init/main.c:1589 kernel_init+0x19/0x1b0 init/main.c:1480 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888020dab8c0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff888020dab8c0, ffff888020dab8c8) The buggy address belongs to the page: page:ffffea0000836ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888020dab898 pfn:0x20dab flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000183c200 0000000500000005 ffff888017841280 raw: ffff888020dab898 0000000080660064 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 8970087847, free_ts 8967075580 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] __kmalloc_track_caller+0x11b/0x330 mm/slub.c:4930 kstrdup mm/util.c:60 [inline] kstrdup_const+0x51/0x90 mm/util.c:83 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:297 dev_set_name+0xdf/0x130 drivers/base/core.c:3200 tty_register_device_attr+0x3b8/0x9a0 drivers/tty/tty_io.c:3272 tty_register_device drivers/tty/tty_io.c:3213 [inline] tty_register_driver+0x5d4/0xb80 drivers/tty/tty_io.c:3471 legacy_pty_init+0x3c1/0x600 drivers/tty/pty.c:581 pty_init+0xa/0x20 drivers/tty/pty.c:943 do_one_initcall+0x272/0x730 init/main.c:1276 do_initcall_level+0x13d/0x1f0 init/main.c:1349 do_initcalls+0x4b/0x90 init/main.c:1365 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 __vunmap+0x8e0/0xa80 mm/vmalloc.c:2661 free_work+0x56/0x80 mm/vmalloc.c:95 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888020dab780: 06 fc fc fc fc 06 fc fc fc fc 06 fc fc fc fc 06 ffff888020dab800: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 04 fc >ffff888020dab880: fc fc fc fb fc fc fc fc fb fc fc fc fc 03 fc fc ^ ffff888020dab900: fc fc 03 fc fc fc fc 03 fc fc fc fc 03 fc fc fc ffff888020dab980: fc 03 fc fc fc fc 03 fc fc fc fc 03 fc fc fc fc ==================================================================