================================================================== BUG: KASAN: slab-out-of-bounds in sysv_new_inode+0xd8c/0xf04 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff0000e41061ce by task syz.2.410/6717 CPU: 1 PID: 6717 Comm: syz.2.410 Not tainted 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x200 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:418 kasan_report+0xa8/0x100 mm/kasan/report.c:522 __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 sysv_create+0x38/0x4c fs/sysv/namei.c:67 lookup_open fs/namei.c:3482 [inline] open_last_lookups fs/namei.c:3550 [inline] path_openat+0x112c/0x2680 fs/namei.c:3780 do_filp_open+0x174/0x344 fs/namei.c:3810 do_sys_openat2+0x128/0x3d8 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] __arm64_sys_openat+0x120/0x154 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/0x138 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 6230: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 __kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x43c 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+0x234/0x318 mm/slub.c:3422 mt_alloc_one lib/maple_tree.c:152 [inline] mas_alloc_nodes+0x274/0x754 lib/maple_tree.c:1277 mas_node_count_gfp lib/maple_tree.c:1359 [inline] mas_preallocate+0x140/0x314 lib/maple_tree.c:5807 __vma_adjust+0x238/0x16b0 mm/mmap.c:723 vma_merge+0xa4c/0xad0 mm/mmap.c:-1 mprotect_fixup+0x25c/0x5c4 mm/mprotect.c:605 do_mprotect_pkey mm/mprotect.c:792 [inline] __do_sys_mprotect mm/mprotect.c:819 [inline] __se_sys_mprotect mm/mprotect.c:816 [inline] __arm64_sys_mprotect+0x5b4/0xa14 mm/mprotect.c:816 __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/0x138 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 6230: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 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+0x16c/0x1ec mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x11c/0x324 mm/slub.c:3683 mas_destroy+0x1bdc/0x22a4 lib/maple_tree.c:5865 mas_store_prealloc+0x274/0x338 lib/maple_tree.c:5790 vma_mas_store+0x194/0x438 mm/mmap.c:433 __vma_adjust+0xbcc/0x16b0 mm/mmap.c:804 vma_merge+0xa4c/0xad0 mm/mmap.c:-1 mprotect_fixup+0x25c/0x5c4 mm/mprotect.c:605 do_mprotect_pkey mm/mprotect.c:792 [inline] __do_sys_mprotect mm/mprotect.c:819 [inline] __se_sys_mprotect mm/mprotect.c:816 [inline] __arm64_sys_mprotect+0x5b4/0xa14 mm/mprotect.c:816 __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/0x138 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 ffff0000e4106000 which belongs to the cache maple_node of size 256 The buggy address is located 206 bytes to the right of 256-byte region [ffff0000e4106000, ffff0000e4106100) The buggy address belongs to the physical page: page:00000000003c308e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x124106 head:00000000003c308e order:1 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc0004058500 dead000000000002 ffff0000c000d680 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e4106080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e4106100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000e4106180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000e4106200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e4106280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== syz.2.410: 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