Buffer I/O error on dev loop2, logical block 3245768, async page read ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0xd8c/0xf04 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff0000f50051ce by task syz.2.613/6322 CPU: 0 PID: 6322 Comm: syz.2.613 Not tainted 6.1.118-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 __asan_report_load2_noabort+0x2c/0x38 mm/kasan/report_generic.c:349 sysv_new_inode+0xd8c/0xf04 fs/sysv/ialloc.c:153 sysv_mknod+0x5c/0x100 fs/sysv/namei.c:53 vfs_mknod+0x3c8/0x448 fs/namei.c:3985 unix_bind_bsd net/unix/af_unix.c:1209 [inline] unix_bind+0x48c/0xc44 net/unix/af_unix.c:1302 __sys_bind+0x1e8/0x284 net/socket.c:1811 __do_sys_bind net/socket.c:1822 [inline] __se_sys_bind net/socket.c:1820 [inline] __arm64_sys_bind+0x7c/0x94 net/socket.c:1820 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 5510: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x458 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x230/0x37c mm/slub.c:3422 getname_flags+0xd0/0x48c fs/namei.c:139 getname+0x28/0x38 fs/namei.c:218 do_sys_openat2+0xd4/0x3e0 fs/open.c:1312 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 5510: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x2f0/0x588 mm/slub.c:3683 putname+0x11c/0x180 fs/namei.c:273 do_sys_openat2+0x1c0/0x3e0 fs/open.c:1327 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000f5004400 which belongs to the cache names_cache of size 4096 The buggy address is located 3534 bytes inside of 4096-byte region [ffff0000f5004400, ffff0000f5005400) The buggy address belongs to the physical page: page:00000000b89eaed7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x135000 head:00000000b89eaed7 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0852300 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f5005080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f5005100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000f5005180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000f5005200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f5005280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== syz.2.613: attempt to access beyond end of device loop2: rw=0, sector=6491536, nr_sectors = 2 limit=128 Buffer I/O error on dev loop2, logical block 3245768, async page read