================================================================== BUG: KASAN: slab-out-of-bounds in get_node_id fs/fuse/fuse_i.h:864 [inline] BUG: KASAN: slab-out-of-bounds in fuse_inode_eq+0x75/0x80 fs/fuse/inode.c:300 Read of size 8 at addr ffff8880385ca1a0 by task syz-executor.0/947 CPU: 0 PID: 947 Comm: syz-executor.0 Not tainted 5.15.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 get_node_id fs/fuse/fuse_i.h:864 [inline] fuse_inode_eq+0x75/0x80 fs/fuse/inode.c:300 find_inode+0xe4/0x220 fs/inode.c:835 ilookup5_nowait fs/inode.c:1345 [inline] ilookup5 fs/inode.c:1374 [inline] iget5_locked+0xbd/0x2e0 fs/inode.c:1155 fuse_iget+0x1cc/0x6b0 fs/fuse/inode.c:341 fuse_lookup_name+0x447/0x630 fs/fuse/dir.c:394 fuse_lookup.part.0+0xdf/0x390 fs/fuse/dir.c:424 fuse_lookup fs/fuse/dir.c:420 [inline] fuse_atomic_open+0x2db/0x440 fs/fuse/dir.c:577 atomic_open fs/namei.c:3144 [inline] lookup_open.isra.0+0xa25/0x13d0 fs/namei.c:3253 open_last_lookups fs/namei.c:3352 [inline] path_openat+0x9a5/0x2740 fs/namei.c:3558 do_filp_open+0x1aa/0x400 fs/namei.c:3588 do_sys_openat2+0x16d/0x4d0 fs/open.c:1200 do_sys_open fs/open.c:1216 [inline] __do_sys_openat fs/open.c:1232 [inline] __se_sys_openat fs/open.c:1227 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1227 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0b34b02709 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0b32058188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0b34c07020 RCX: 00007f0b34b02709 RDX: 0000000000000000 RSI: 00000000200020c0 RDI: ffffffffffffff9c RBP: 00007f0b34b5ccb4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffd6fb3d2f R14: 00007f0b32058300 R15: 0000000000022000 Allocated by task 1374: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x83/0xb0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc+0x142/0x390 mm/slub.c:3219 nilfs_alloc_inode+0x19/0xe0 fs/nilfs2/super.c:154 alloc_inode+0x61/0x230 fs/inode.c:237 iget5_locked fs/inode.c:1158 [inline] iget5_locked+0x1e7/0x2e0 fs/inode.c:1151 nilfs_iget_locked+0x9c/0xd0 fs/nilfs2/inode.c:570 nilfs_ifile_read+0x2c/0x1a0 fs/nilfs2/ifile.c:187 nilfs_attach_checkpoint+0x258/0x4b0 fs/nilfs2/super.c:540 nilfs_fill_super fs/nilfs2/super.c:1063 [inline] nilfs_mount+0xb12/0xfb0 fs/nilfs2/super.c:1316 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1498 do_new_mount fs/namespace.c:2988 [inline] path_mount+0x1320/0x1fa0 fs/namespace.c:3318 do_mount fs/namespace.c:3331 [inline] __do_sys_mount fs/namespace.c:3539 [inline] __se_sys_mount fs/namespace.c:3516 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3516 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3067 destroy_inode+0x129/0x1b0 fs/inode.c:292 iput_final fs/inode.c:1664 [inline] iput.part.0+0x539/0x850 fs/inode.c:1690 iput+0x58/0x70 fs/inode.c:1680 nilfs_put_root+0xa9/0xd0 fs/nilfs2/the_nilfs.c:802 nilfs_segctor_destroy fs/nilfs2/segment.c:2744 [inline] nilfs_detach_log_writer+0x57b/0x9f0 fs/nilfs2/segment.c:2807 nilfs_put_super+0x3f/0x1a0 fs/nilfs2/super.c:467 generic_shutdown_super+0x14c/0x370 fs/super.c:465 kill_block_super+0x97/0xf0 fs/super.c:1395 deactivate_locked_super+0x94/0x160 fs/super.c:335 deactivate_super+0xad/0xd0 fs/super.c:366 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1137 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3067 destroy_inode+0x129/0x1b0 fs/inode.c:292 iput_final fs/inode.c:1664 [inline] iput.part.0+0x539/0x850 fs/inode.c:1690 iput+0x58/0x70 fs/inode.c:1680 nilfs_put_super+0x108/0x1a0 fs/nilfs2/super.c:477 generic_shutdown_super+0x14c/0x370 fs/super.c:465 kill_block_super+0x97/0xf0 fs/super.c:1395 deactivate_locked_super+0x94/0x160 fs/super.c:335 deactivate_super+0xad/0xd0 fs/super.c:366 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1137 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880385c9998 which belongs to the cache nilfs2_inode_cache of size 2056 The buggy address is located 0 bytes to the right of 2056-byte region [ffff8880385c9998, ffff8880385ca1a0) The buggy address belongs to the page: page:ffffea0000e17200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880385ca220 pfn:0x385c8 head:ffffea0000e17200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000fb6c00 0000000500000005 ffff8881443ac3c0 raw: ffff8880385ca220 00000000800f000a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 27643, ts 828871828391, free_ts 813513340859 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2197 alloc_slab_page mm/slub.c:1763 [inline] allocate_slab mm/slub.c:1900 [inline] new_slab+0x319/0x490 mm/slub.c:1963 ___slab_alloc+0x921/0xfe0 mm/slub.c:2994 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3081 slab_alloc_node mm/slub.c:3172 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc+0x365/0x390 mm/slub.c:3219 nilfs_alloc_inode+0x19/0xe0 fs/nilfs2/super.c:154 alloc_inode+0x61/0x230 fs/inode.c:237 iget5_locked fs/inode.c:1158 [inline] iget5_locked+0x1e7/0x2e0 fs/inode.c:1151 nilfs_iget_locked+0x9c/0xd0 fs/nilfs2/inode.c:570 nilfs_dat_read+0x80/0x2c0 fs/nilfs2/dat.c:483 nilfs_load_super_root fs/nilfs2/the_nilfs.c:120 [inline] load_nilfs+0x327/0x11d0 fs/nilfs2/the_nilfs.c:269 nilfs_fill_super fs/nilfs2/super.c:1058 [inline] nilfs_mount+0xa9a/0xfb0 fs/nilfs2/super.c:1316 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1498 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x95/0xb0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc+0x209/0x390 mm/slub.c:3219 kmem_cache_zalloc include/linux/slab.h:711 [inline] lsm_file_alloc security/security.c:572 [inline] security_file_alloc+0x34/0x170 security/security.c:1515 __alloc_file+0xd8/0x280 fs/file_table.c:106 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe4/0x2740 fs/namei.c:3547 do_filp_open+0x1aa/0x400 fs/namei.c:3588 do_sys_openat2+0x16d/0x4d0 fs/open.c:1200 do_sys_open fs/open.c:1216 [inline] __do_sys_open fs/open.c:1224 [inline] __se_sys_open fs/open.c:1220 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1220 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880385ca080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880385ca100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880385ca180: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880385ca200: fc fc fc fc fb fb fb fb fb fb fb fb fb fb fb fb ffff8880385ca280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================