From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.231.139 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796422185; b=3qtT2OBX45QsenhcH9th65HIc3gP26to+QIez1Ncg3VfAnO3v4hVYNizLEo4xhH3tlQp VdV8uTngKCg9pg9em7NvtybmdyNdSaxnIkPYjif3gxTOhtfyw+RGyrVZVWmjyp6r2qblG yefnQLu5HZ4PDshENECLDNfZ45mjIwUsMSPThKmpkaTO8w+WjWdbrdND7gCRo0hk3tR0b rSKcc4ndnOPkiyiaSjcxXnBqult/B6cbdS1dED/tQzNGED92OP73vxdPhuF/9fcJofl6M JJD/UfFxWnsa5ZGTfPUckspz6eWSI+VFrKefZvH5G42/s1Jkl+Fkex2CaOFO+/uCk9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796422185; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=bTvU8QaftWkCYsvllCk9RJH+i/DgoG3Ous5okGfbKws=; b=VynnO5VZHMUFA9vBvXLuetdPcy/vVjP/Y4LXaQbvIHHBaBmGLLpyp2kJ6oPkEpUA4TOv 6+1W/Hh+w9Z1iSYjWSgKXbbVl3krh0EOp4i5GLKDmP4ELVtAd08OnQmp3R80VCGKKWp7y SeSHEbjyPPhYNn30fCqe0s7NH9VQJz8DDiyGPq47917axQIHnK3y9NHd/I2HfPuw5oyWb 8Z0z/IR+f4psxm/eoCCd+8SEx7hHOfrRsyugXVCgv0ezZwPfoUE+wloZD2sVm3+WPgxNr oVVVgOVlPdVTejkxubnqv060l8RXPw5hG7Kj2gyjKWXWmCObs1hbLoFZ02kXf8l1/lA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=74.125.231.139 Received: from mail-oo2-f11.google.com (mail-oo2-f11.google.com [74.125.231.139]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8B72606A32D for ; Fri, 4 Dec 2026 22:09:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A8B72606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo2-f11.google.com with SMTP id 006d021491bc7-71b9fb2b4beso345195eaf.1 for ; Fri, 04 Dec 2026 14:09:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796422183; x=1797026983; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bTvU8QaftWkCYsvllCk9RJH+i/DgoG3Ous5okGfbKws=; b=RPOuKtKH3TPRIC/+bx8k0S6EIAwXPr2E4p1n+COUjopYTbTCMP9fqsfv9CpV1S9uuM YQQl4WRrkCrKIA162uichfYPSqdm99PcqDIdRStcRPMoA2E0nKUrhF1tv2tinROhJVJq WiW2oViuG+lkO2IJ3aj3q7p81csLYx2m3Ojgvgj3i+6Y+6whwfnBxhpdW9bzAe7zjCpr Pfi2bprafXKZDFoGH0mjm2XB/o3XcvZAJbpND0Bry5eb884NI2HwvKueMUw3QvOai/Jr Bb2QP3EeOHZhpqGIG4GDvQ7CVeWxGu+zIWsi+3V7IQWkiZsR/IYD4jUK4BgUJNYuZdKM hziA== X-Forwarded-Encrypted: i=1; AL+hErFg8TcDEhFE23E1OlYUr4dwT4eY0a+mDg6aWew7/g28a3rMaoMVXnbyARtbC8aCeC58/P6DR5NQIa41Rw==@vger.kernel.org X-Gm-Message-State: APuU4Z84oTHUNxdwm6g5gP6XfFs6nii/y8X8rNjCI5YTg24AKJqFp4B3 UmGh+K5HHfjC4TjyK+MEAs5+KQ950qQpwN2WYlW4IL+L6SopPiQUudSeEo7o/fuwJ1CWxmbtAjT UcX64XwfVhjAxRF3PpL4sicCDDciRC0Y6mFPc+l3+Yv+ifdFPPoeerks58J0= X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6820:890b:10b0:71b:5188:ce33 with SMTP id 006d021491bc7-71bf21b3da1mr2274665eaf.70.1796422183623; Fri, 04 Dec 2026 14:09:43 -0800 (PST) Date: Fri, 04 Dec 2026 14:09:43 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b133a27.43cba1a4.221543.0bbc.GAE@google.com> Subject: [syzbot] [btrfs?] KASAN: slab-use-after-free Read in igrab From: syzbot To: dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, mason@kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: d06ce6f1eb5e Merge tag 'for_linus' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17ea82ff980000 kernel config: https://syzkaller.appspot.com/x/.config?x=fc1834b4a2e3ba54 dashboard link: https://syzkaller.appspot.com/bug?extid=9b287ab048073bea5a2c compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/44765da165e5/disk-d06ce6f1.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/7ded4515dc51/vmlinux-d06ce6f1.xz kernel image: https://storage.googleapis.com/syzbot-assets/ad67e398df74/bzImage-d06ce6f1.xz AI-generated root cause summary: In btrfs_destroy_delalloc_inodes() (fs/btrfs/disk-io.c), btrfs_del_delalloc_inode(btrfs_inode) removes the inode from the delalloc list and spin_unlock(&root->delalloc_lock) is called before igrab(&btrfs_inode->vfs_inode). Dropping root->delalloc_lock without holding an inode reference or RCU protection allows a concurrent inode eviction (such as evict_inodes() during unmount via generic_shutdown_super() before close_ctree() stops transaction_kthread) to clear delalloc state in btrfs_evict_inode(), call destroy_inode(), and free the btrfs_inode via call_rcu(). When btrfs-transacti then executes or resumes inside igrab(&btrfs_inode->vfs_inode), it accesses the freed btrfs_inode (specifically acquiring inode->i_lock), resulting in a slab-use-after-free. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=9b287ab048073bea5a2c IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+9b287ab048073bea5a2c@syzkaller.appspotmail.com ================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:155 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:181 Read of size 1 at addr ffff8880635b99d8 by task btrfs-transacti/20950 CPU: 0 UID: 0 PID: 20950 Comm: btrfs-transacti Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:588 kasan_check_byte include/linux/kasan.h:406 [inline] lock_acquire+0x7d/0x350 kernel/locking/lockdep.c:5916 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:155 [inline] _raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:181 rtlock_slowlock kernel/locking/rtmutex.c:1921 [inline] rtlock_lock kernel/locking/spinlock_rt.c:43 [inline] __rt_spin_lock kernel/locking/spinlock_rt.c:49 [inline] rt_spin_lock+0x157/0x400 kernel/locking/spinlock_rt.c:57 spin_lock include/linux/spinlock_rt.h:45 [inline] igrab+0xfb/0x2f0 fs/inode.c:1616 btrfs_destroy_delalloc_inodes fs/btrfs/disk-io.c:4809 [inline] btrfs_destroy_all_delalloc_inodes fs/btrfs/disk-io.c:4837 [inline] btrfs_cleanup_transaction+0xda3/0x17e0 fs/btrfs/disk-io.c:5033 transaction_kthread+0x398/0x460 fs/btrfs/disk-io.c:1650 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 20956: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 unpoison_slab_object mm/kasan/common.c:354 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:380 kasan_slab_alloc include/linux/kasan.h:257 [inline] slab_post_alloc_hook mm/slub.c:4720 [inline] slab_alloc_node mm/slub.c:5033 [inline] kmem_cache_alloc_lru_noprof+0x358/0x680 mm/slub.c:5066 btrfs_alloc_inode+0x58/0x380 fs/btrfs/inode.c:8012 alloc_inode+0x6a/0x1b0 fs/inode.c:338 iget5_locked_rcu+0x17f/0x220 fs/inode.c:1449 btrfs_iget_locked fs/btrfs/inode.c:5885 [inline] btrfs_iget+0x12e/0x340 fs/btrfs/inode.c:5927 btrfs_lookup_dentry+0x487/0x1390 fs/btrfs/inode.c:6023 btrfs_lookup+0x1d/0x40 fs/btrfs/inode.c:6091 __lookup_slow+0x1fb/0x2f0 fs/namei.c:1925 lookup_slow+0x59/0x80 fs/namei.c:1942 walk_component fs/namei.c:2288 [inline] lookup_last fs/namei.c:2795 [inline] path_lookupat+0x3f5/0x8c0 fs/namei.c:2819 filename_lookup+0x265/0x5d0 fs/namei.c:2848 ksys_truncate+0xbb/0x1c0 fs/open.c:140 __do_sys_truncate fs/open.c:154 [inline] __se_sys_truncate fs/open.c:152 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:152 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 20: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:599 poison_slab_object mm/kasan/common.c:267 [inline] __kasan_slab_free+0x70/0x90 mm/kasan/common.c:299 kasan_slab_free include/linux/kasan.h:239 [inline] slab_free_hook mm/slub.c:2780 [inline] slab_free mm/slub.c:6637 [inline] kmem_cache_free+0x189/0x6d0 mm/slub.c:6764 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core kernel/rcu/tree.c:2919 [inline] rcu_cpu_kthread+0xb2f/0x1700 kernel/rcu/tree.c:3007 smpboot_thread_fn+0x5f8/0xb30 kernel/smpboot.c:162 kthread+0x38b/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 __kasan_record_aux_stack+0xc5/0xe0 mm/kasan/generic.c:561 __call_rcu_common kernel/rcu/tree.c:3287 [inline] call_rcu+0x86/0x300 kernel/rcu/tree.c:3395 destroy_inode fs/inode.c:392 [inline] evict+0xa27/0xc20 fs/inode.c:853 dispose_list fs/inode.c:871 [inline] evict_inodes+0x844/0x8c0 fs/inode.c:924 generic_shutdown_super+0xad/0x2d0 fs/super.c:709 kill_anon_super+0x3b/0x70 fs/super.c:1315 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2139 deactivate_locked_super+0xbe/0x110 fs/super.c:558 cleanup_mnt+0x204/0x2a0 fs/namespace.c:1396 task_work_run+0x1d9/0x260 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline] do_syscall_64+0x336/0x540 arch/x86/entry/syscall_64.c:107 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880635b9470 which belongs to the cache btrfs_inode of size 2488 The buggy address is located 1384 bytes inside of freed 2488-byte region [ffff8880635b9470, ffff8880635b9e28) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x635b8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880635bfaa1 flags: 0x80000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000040 ffff88814b6d8a00 dead000000000100 dead000000000122 raw: 0000000000000000 00000002000c000c 00000000f5000000 ffff8880635bfaa1 head: 0080000000000040 ffff88814b6d8a00 dead000000000100 dead000000000122 head: 0000000000000000 00000002000c000c 00000000f5000000 ffff8880635bfaa1 head: 0080000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5834, tgid 5824 (syz.1.2), ts 93409249582 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1873 prep_new_page+0x22/0xb0 mm/page_alloc.c:1881 get_page_from_freelist+0x280d/0x2850 mm/page_alloc.c:3963 __alloc_frozen_pages_noprof+0x230/0x470 mm/page_alloc.c:5505 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab+0x7d/0x5e0 mm/slub.c:3499 new_slab mm/slub.c:3550 [inline] refill_objects+0x2d8/0x350 mm/slub.c:7554 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x339/0x690 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] kmem_cache_alloc_lru_noprof+0x450/0x680 mm/slub.c:5066 btrfs_alloc_inode+0x58/0x380 fs/btrfs/inode.c:8012 alloc_inode+0x6a/0x1b0 fs/inode.c:338 new_inode+0x1f/0x170 fs/inode.c:1192 btrfs_init_btree_inode fs/btrfs/disk-io.c:1990 [inline] open_ctree+0x5e3/0x4140 fs/btrfs/disk-io.c:3449 btrfs_fill_super fs/btrfs/super.c:971 [inline] btrfs_get_tree_super fs/btrfs/super.c:1956 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2099 [inline] btrfs_get_tree+0x10cf/0x1a00 fs/btrfs/super.c:2133 vfs_get_tree+0x92/0x2a0 fs/super.c:1881 fc_mount fs/namespace.c:1282 [inline] do_new_mount_fc fs/namespace.c:3910 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3986 do_mount fs/namespace.c:4350 [inline] __do_sys_mount fs/namespace.c:4563 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4540 page_owner free stack trace missing Memory state around the buggy address: ffff8880635b9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880635b9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880635b9980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880635b9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880635b9a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup