================================================================== BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692 Read of size 1 at addr ffff888017678830 by task syz.3.1365/8663 CPU: 1 PID: 8663 Comm: syz.3.1365 Not tainted 6.1.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692 rose_connect+0x412/0x1380 net/rose/af_rose.c:816 __sys_connect_file net/socket.c:2011 [inline] __sys_connect+0x389/0x410 net/socket.c:2028 __do_sys_connect net/socket.c:2038 [inline] __se_sys_connect net/socket.c:2035 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:2035 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f42d998e929 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:00007f42d97bd038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f42d9bb6160 RCX: 00007f42d998e929 RDX: 000000000000001c RSI: 0000200000000040 RDI: 0000000000000004 RBP: 00007f42d9a10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f42d9bb6160 R15: 00007ffc94f9a5a8 Allocated by task 3637: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] kernfs_fop_open+0x3f1/0xcc0 fs/kernfs/file.c:672 do_dentry_open+0x7e9/0x10d0 fs/open.c:882 do_open fs/namei.c:3626 [inline] path_openat+0x25c6/0x2e70 fs/namei.c:3783 do_filp_open+0x1c1/0x3c0 fs/namei.c:3810 do_sys_openat2+0x142/0x490 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1345 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888017678800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of 512-byte region [ffff888017678800, ffff888017678a00) The buggy address belongs to the physical page: page:ffffea00005d9e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888017678000 pfn:0x17678 head:ffffea00005d9e00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001d02b08 ffffea000152fd08 ffff888017441c80 raw: ffff888017678000 000000000010000c 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 0x0(), pid 1, tgid 1 (swapper/0), ts 2311460769, free_ts 0 create_dummy_stack mm/page_owner.c:67 [inline] register_early_stack+0x86/0xe0 mm/page_owner.c:83 init_page_owner+0x2f/0x5b0 mm/page_owner.c:93 invoke_init_callbacks mm/page_ext.c:126 [inline] page_ext_init+0x7f1/0x856 mm/page_ext.c:518 kernel_init_freeable+0x3f5/0x5ac init/main.c:1624 page_owner free stack trace missing Memory state around the buggy address: ffff888017678700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888017678780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888017678800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888017678880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888017678900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================