================================================================== BUG: KASAN: slab-use-after-free in check_igot_inode+0x187/0x1b0 fs/ext4/inode.c:4656 Read of size 8 at addr ffff88803e586290 by task syz-executor.4/6476 CPU: 0 PID: 6476 Comm: syz-executor.4 Not tainted 6.5.0-syzkaller-09276-g99d99825fc07 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 check_igot_inode+0x187/0x1b0 fs/ext4/inode.c:4656 __ext4_iget+0x14fb/0x4300 fs/ext4/inode.c:4708 __ext4_fill_super fs/ext4/super.c:5473 [inline] ext4_fill_super+0x6806/0xade0 fs/ext4/super.c:5703 get_tree_bdev+0x3b5/0x650 fs/super.c:1577 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1fc487e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1fc5634ee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1fc5634f80 RCX: 00007f1fc487e1ea RDX: 0000000020000100 RSI: 0000000020000500 RDI: 00007f1fc5634f40 RBP: 0000000020000100 R08: 00007f1fc5634f80 R09: 0000000002008002 R10: 0000000002008002 R11: 0000000000000202 R12: 0000000020000500 R13: 00007f1fc5634f40 R14: 000000000000053b R15: 0000000020000080 Allocated by task 31277: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x21a/0x630 mm/slub.c:3509 alloc_inode_sb include/linux/fs.h:2909 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:259 new_inode_pseudo fs/inode.c:1004 [inline] new_inode+0x22/0x260 fs/inode.c:1030 reiserfs_mkdir+0x214/0x9a0 fs/reiserfs/namei.c:813 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:891 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1007 reiserfs_remount+0xb6e/0x1640 fs/reiserfs/super.c:1586 legacy_reconfigure+0x119/0x180 fs/fs_context.c:661 reconfigure_super+0x44f/0xb10 fs/super.c:1140 vfs_cmd_reconfigure fs/fsopen.c:267 [inline] vfs_fsconfig_locked fs/fsopen.c:296 [inline] __do_sys_fsconfig+0x984/0xb90 fs/fsopen.c:475 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653 destroy_inode+0x129/0x1b0 fs/inode.c:314 iput_final fs/inode.c:1775 [inline] iput.part.0+0x55e/0x7a0 fs/inode.c:1801 iput+0x5c/0x80 fs/inode.c:1791 reiserfs_new_inode+0x4b5/0x20b0 fs/reiserfs/inode.c:2152 reiserfs_mkdir+0x4c0/0x9a0 fs/reiserfs/namei.c:843 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:891 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1007 reiserfs_remount+0xb6e/0x1640 fs/reiserfs/super.c:1586 legacy_reconfigure+0x119/0x180 fs/fs_context.c:661 reconfigure_super+0x44f/0xb10 fs/super.c:1140 vfs_cmd_reconfigure fs/fsopen.c:267 [inline] vfs_fsconfig_locked fs/fsopen.c:296 [inline] __do_sys_fsconfig+0x984/0xb90 fs/fsopen.c:475 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653 destroy_inode+0x129/0x1b0 fs/inode.c:314 dispose_list+0x117/0x1e0 fs/inode.c:697 evict_inodes+0x34f/0x450 fs/inode.c:747 generic_shutdown_super+0xb5/0x3c0 fs/super.c:672 kill_block_super+0x3b/0x70 fs/super.c:1646 deactivate_locked_super+0x9a/0x170 fs/super.c:481 deactivate_super+0xde/0x100 fs/super.c:514 cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254 task_work_run+0x14d/0x240 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88803e585cc0 which belongs to the cache reiser_inode_cache of size 1568 The buggy address is located 1488 bytes inside of freed 1568-byte region [ffff88803e585cc0, ffff88803e5862e0) The buggy address belongs to the physical page: page:ffffea0000f96000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803e584f80 pfn:0x3e580 head:ffffea0000f96000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888022c7e801 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888147e54640 0000000000000000 dead000000000001 raw: ffff88803e584f80 0000000080130007 00000001ffffffff ffff888022c7e801 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 11921, tgid 11918 (syz-executor.3), ts 477722196644, free_ts 468037373201 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3183 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4439 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8be/0x1570 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x4e4/0x630 mm/slub.c:3509 alloc_inode_sb include/linux/fs.h:2909 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:259 iget5_locked fs/inode.c:1269 [inline] iget5_locked+0x63/0xe0 fs/inode.c:1262 reiserfs_fill_super+0x10e7/0x3150 fs/reiserfs/super.c:2053 mount_bdev+0x1f3/0x2e0 fs/super.c:1629 legacy_get_tree+0x109/0x220 fs/fs_context.c:638 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18b/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x185/0x3f0 mm/slub.c:3523 __alloc_skb+0x287/0x330 net/core/skbuff.c:634 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6299 sock_alloc_send_pskb+0x7c8/0x950 net/core/sock.c:2794 unix_dgram_sendmsg+0x455/0x1c30 net/unix/af_unix.c:1953 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:753 __sys_sendto+0x255/0x340 net/socket.c:2176 __do_sys_sendto net/socket.c:2188 [inline] __se_sys_sendto net/socket.c:2184 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2184 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88803e586180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803e586200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803e586280: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff88803e586300: fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00 00 ffff88803e586380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================