Re: [syzbot] [btrfs?] general protection fault in apply_wqattrs_cleanup

From: David Sterba
Date: Tue Jul 30 2024 - 10:35:12 EST


On Mon, Jun 03, 2024 at 06:56:31AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c3f38fa61af7 Linux 6.10-rc2
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=127bdaba980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=998c63c06e77f5e7
> dashboard link: https://syzkaller.appspot.com/bug?extid=1b5f11df288ca3853de9
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: i386
>
> Unfortunately, I don't have any reproducer for this issue yet.

Most likely this was a side effect of bug fixed by commit f3a5367c679d
("btrfs: protect folio::private when attaching extent buffer folios").

The timeframe corresponds with increased number of bogus errors caused
by use-after-free of a page. The stack trace reported by syzbot is
inside allocation, likely reusing a page.

The fix is best guess.

#syz fix: btrfs: protect folio::private when attaching extent buffer folios