attempt to access beyond end of device loop1: rw=0, want=6491538, limit=128 Buffer I/O error on dev loop1, logical block 3245768, async page read ------------[ cut here ]------------ WARNING: CPU: 1 PID: 6164 at fs/inode.c:364 inc_nlink+0x130/0x168 fs/inode.c:364 Modules linked in: CPU: 1 PID: 6164 Comm: syz.1.454 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : inc_nlink+0x130/0x168 fs/inode.c:364 lr : inc_nlink+0x130/0x168 fs/inode.c:364 sp : ffff800021487b50 x29: ffff800021487b50 x28: dfff800000000000 x27: 0000000000000000 x26: 1fffe00019c2e112 x25: ffff800011e72988 x24: 0000000000000000 x23: 1fffe0001b7c9810 x22: dfff800000000000 x21: 0000000000000000 x20: ffff0000dbe4c038 x19: ffff0000dbe4c080 x18: 0000000000000000 x17: 0000000000000002 x16: ffff800011ab80a8 x15: 0000000000000003 x14: 00000000ffff8000 x13: 00000000fd541458 x12: 0000000000040000 x11: 000000000003ffff x10: ffff80002068a000 x9 : 0000000000040000 x8 : ffff8000089ea630 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000000 x2 : ffff0000dbcb7318 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: inc_nlink+0x130/0x168 fs/inode.c:364 inode_inc_link_count include/linux/fs.h:2499 [inline] sysv_mkdir+0x2c/0x138 fs/sysv/namei.c:119 vfs_mkdir+0x334/0x4e4 fs/namei.c:4065 do_mkdirat+0x20c/0x610 fs/namei.c:4090 __do_sys_mkdirat fs/namei.c:4105 [inline] __se_sys_mkdirat fs/namei.c:4103 [inline] __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4103 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 3736 hardirqs last enabled at (3735): [] kasan_quarantine_put+0xdc/0x204 mm/kasan/quarantine.c:231 hardirqs last disabled at (3736): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:396 softirqs last enabled at (3396): [] softirq_handle_end kernel/softirq.c:401 [inline] softirqs last enabled at (3396): [] handle_softirqs+0xb88/0xdbc kernel/softirq.c:586 softirqs last disabled at (3381): [] __do_softirq kernel/softirq.c:592 [inline] softirqs last disabled at (3381): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (3381): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (3381): [] __irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641 ---[ end trace 26250710ea2a98d7 ]--- ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0xd74/0xeec fs/sysv/ialloc.c:153 Read of size 2 at addr ffff0000eb5b61ce by task syz.1.454/6164 CPU: 0 PID: 6164 Comm: syz.1.454 Tainted: G W 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load2_noabort+0x44/0x50 mm/kasan/report_generic.c:307 sysv_new_inode+0xd74/0xeec fs/sysv/ialloc.c:153 sysv_mkdir+0x44/0x138 fs/sysv/namei.c:121 vfs_mkdir+0x334/0x4e4 fs/namei.c:4065 do_mkdirat+0x20c/0x610 fs/namei.c:4090 __do_sys_mkdirat fs/namei.c:4105 [inline] __se_sys_mkdirat fs/namei.c:4103 [inline] __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4103 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the page: page:00000000a864a558 refcount:0 mapcount:0 mapping:0000000000000000 index:0x100 pfn:0x12b5b6 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000100 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000eb5b6080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000eb5b6100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000eb5b6180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000eb5b6200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000eb5b6280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================