loop5: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in nilfs_iget_test+0x3e4/0x440 fs/nilfs2/inode.c:544 Read of size 8 at addr ffff8880445e70b8 by task syz-executor.5/9539 CPU: 1 PID: 9539 Comm: syz-executor.5 Not tainted 6.3.0-rc4-syzkaller-00034-gfcd476ea6a88 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 nilfs_iget_test+0x3e4/0x440 fs/nilfs2/inode.c:544 find_inode+0xe4/0x220 fs/inode.c:916 ilookup5_nowait fs/inode.c:1429 [inline] ilookup5 fs/inode.c:1458 [inline] iget5_locked+0xb5/0x2c0 fs/inode.c:1239 nilfs_iget_locked+0xa4/0xe0 fs/nilfs2/inode.c:605 nilfs_dat_read+0x88/0x370 fs/nilfs2/dat.c:508 nilfs_load_super_root fs/nilfs2/the_nilfs.c:121 [inline] load_nilfs+0x36c/0x1320 fs/nilfs2/the_nilfs.c:302 nilfs_fill_super fs/nilfs2/super.c:1068 [inline] nilfs_mount+0xb52/0x1150 fs/nilfs2/super.c:1324 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22ac48d62a Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f22ad1cbf88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00000000000009f4 RCX: 00007f22ac48d62a RDX: 0000000020000a00 RSI: 0000000020000a40 RDI: 00007f22ad1cbfe0 RBP: 00007f22ad1cc020 R08: 00007f22ad1cc020 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000a00 R13: 0000000020000a40 R14: 00007f22ad1cbfe0 R15: 0000000020000a80 Allocated by task 8179: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slab.c:3257 [inline] slab_alloc mm/slab.c:3266 [inline] __kmem_cache_alloc_lru mm/slab.c:3443 [inline] kmem_cache_alloc_lru+0x251/0x640 mm/slab.c:3459 alloc_inode_sb include/linux/fs.h:2686 [inline] f2fs_alloc_inode+0x103/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x700 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x3c08/0x8bb0 fs/f2fs/super.c:4364 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880445e70c0 which belongs to the cache f2fs_inode_cache of size 2152 The buggy address is located 8 bytes to the left of allocated 2152-byte region [ffff8880445e70c0, ffff8880445e7928) The buggy address belongs to the physical page: page:ffffea00011179c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x445e7 memcg:ffff88804e360601 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888145efb300 ffff88801c513c50 ffffea00012e9790 raw: 0000000000000000 ffff8880445e70c0 0000000100000001 ffff88804e360601 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x342050(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE|__GFP_RECLAIMABLE), pid 8179, tgid 8175 (syz-executor.0), ts 416876567437, free_ts 402938046493 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1360 [inline] cache_grow_begin+0x9b/0x3b0 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] slab_alloc mm/slab.c:3266 [inline] __kmem_cache_alloc_lru mm/slab.c:3443 [inline] kmem_cache_alloc_lru+0x540/0x640 mm/slab.c:3459 alloc_inode_sb include/linux/fs.h:2686 [inline] f2fs_alloc_inode+0x103/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x700 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x3c08/0x8bb0 fs/f2fs/super.c:4364 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1504 free_unref_page_prepare mm/page_alloc.c:3388 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3483 slab_destroy mm/slab.c:1613 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1633 cache_flusharray mm/slab.c:3361 [inline] ___cache_free+0x2ae/0x3d0 mm/slab.c:3424 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slab.c:3257 [inline] kmem_cache_alloc_node+0x296/0x510 mm/slab.c:3529 __alloc_skb+0x288/0x330 net/core/skbuff.c:596 alloc_skb include/linux/skbuff.h:1277 [inline] __ip_append_data+0x2cab/0x39f0 net/ipv4/ip_output.c:1126 ip_append_data net/ipv4/ip_output.c:1343 [inline] ip_append_data+0x115/0x1a0 net/ipv4/ip_output.c:1322 raw_sendmsg+0xa98/0x2fc0 net/ipv4/raw.c:642 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x334/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 Memory state around the buggy address: ffff8880445e6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880445e7000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880445e7080: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff8880445e7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880445e7180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================