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

From: David Sterba
Date: Tue Jul 30 2024 - 10:52:23 EST


On Sat, May 25, 2024 at 09:18:27AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 56fb6f92854f Merge tag 'drm-next-2024-05-25' of https://gi..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16bfdae8980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=2b8d1faad9ceb620
> dashboard link: https://syzkaller.appspot.com/bug?extid=8cfa88c4efc731f03e7e
> 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.

> Oops: general protection fault, probably for non-canonical address 0xe01ffbf11002a963: 0000 [#1] PREEMPT SMP KASAN NOPTI
> KASAN: maybe wild-memory-access in range [0x00ffff8880154b18-0x00ffff8880154b1f]

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 fix is best guess.

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