================================================================== 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 ffff888021098b40 by task syz.4.757/7315 CPU: 0 PID: 7315 Comm: syz.4.757 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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 traverse+0x1fc/0x590 fs/seq_file.c:111 seq_lseek+0x133/0x260 fs/seq_file.c:323 proc_reg_llseek+0x1ae/0x280 fs/proc/inode.c:284 vfs_llseek fs/read_write.c:300 [inline] ksys_lseek fs/read_write.c:313 [inline] __do_sys_lseek fs/read_write.c:324 [inline] __se_sys_lseek fs/read_write.c:322 [inline] __x64_sys_lseek+0x169/0x1f0 fs/read_write.c:322 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:0x7f5725eb9199 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:00007f5724111028 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 00007f5726140fa0 RCX: 00007f5725eb9199 RDX: 0000000000000000 RSI: 0000002000000008 RDI: 0000000000000005 RBP: 00007f5725f50888 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5726141038 R14: 00007f5726140fa0 R15: 00007ffe4dced688 Allocated by task 4198: 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 kmalloc_node include/linux/slab.h:630 [inline] __vmalloc_area_node mm/vmalloc.c:2918 [inline] __vmalloc_node_range+0x2dd/0x8b0 mm/vmalloc.c:3037 __vmalloc_node mm/vmalloc.c:3087 [inline] vzalloc+0x75/0x80 mm/vmalloc.c:3157 __do_replace+0xa8/0x9f0 net/ipv4/netfilter/ip_tables.c:1045 do_replace net/ipv4/netfilter/ip_tables.c:1140 [inline] do_ipt_set_ctl+0xa9b/0xd70 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x29c3/0x31e0 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x229/0x1e60 net/ipv4/tcp.c:3722 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 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 Freed by task 4198: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 __vunmap+0x9d4/0xa80 mm/vmalloc.c:2634 __do_replace+0x895/0x9f0 net/ipv4/netfilter/ip_tables.c:1089 do_replace net/ipv4/netfilter/ip_tables.c:1140 [inline] do_ipt_set_ctl+0xa9b/0xd70 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x29c3/0x31e0 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x229/0x1e60 net/ipv4/tcp.c:3722 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 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 The buggy address belongs to the object at ffff888021098b40 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff888021098b40, ffff888021098b48) The buggy address belongs to the page: page:ffffea0000842600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21098 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888017841280 raw: 0000000000000000 0000000000660066 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 8280604495, free_ts 0 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+0x3c7/0x9d0 drivers/tty/tty_io.c:3286 tty_register_device drivers/tty/tty_io.c:3226 [inline] tty_register_driver+0x5d4/0xb80 drivers/tty/tty_io.c:3484 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_owner free stack trace missing Memory state around the buggy address: ffff888021098a00: 06 fc fc fc fc 06 fc fc fc fc 06 fc fc fc fc 06 ffff888021098a80: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 04 fc >ffff888021098b00: fc fc fc 07 fc fc fc fc fa fc fc fc fc 05 fc fc ^ ffff888021098b80: fc fc 05 fc fc fc fc 05 fc fc fc fc 05 fc fc fc ffff888021098c00: fc 05 fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc ==================================================================