Re: [syzbot] [btrfs?] kernel BUG in clear_inode

From: David Sterba
Date: Tue Jul 30 2024 - 10:43:48 EST


On Thu, Jun 06, 2024 at 10:05:29PM -0700, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: d30d0e49da71 Merge tag 'net-6.10-rc3' of git://git.kernel...
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1736820a980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=399230c250e8119c
> dashboard link: https://syzkaller.appspot.com/bug?extid=67ba3c42bcbb4665d3ad
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a9aa22980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14c57f16980000
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-d30d0e49.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/f1276023ed77/vmlinux-d30d0e49.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/a33f372d4fb8/bzImage-d30d0e49.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/7fc863ff127d/mount_0.gz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+67ba3c42bcbb4665d3ad@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ------------[ cut here ]------------
> kernel BUG at fs/inode.c:626!

BUG_ON(inode->i_state & I_CLEAR);

The bits are not manipulated directly in filesystems but the inode is in
a bad state in evict. The reported bug looks valid and there's a
reproducer.