public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: syzbot <syzbot+1d8c82e66f2e76b6b427@syzkaller.appspotmail.com>
Cc: djwong@kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] kernel BUG in assfail
Date: Tue, 22 Nov 2022 15:35:04 +1100	[thread overview]
Message-ID: <20221122043504.GR3600936@dread.disaster.area> (raw)
In-Reply-To: <00000000000063536805ee0769d8@google.com>

On Mon, Nov 21, 2022 at 08:14:43PM -0800, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    eb7081409f94 Linux 6.1-rc6
> git tree:       upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=12e5bb0d880000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=8cdf448d3b35234
> dashboard link: https://syzkaller.appspot.com/bug?extid=1d8c82e66f2e76b6b427
> compiler:       Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=169e86fd880000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1691470d880000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/4a019f55c517/disk-eb708140.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/eb36e890aa8b/vmlinux-eb708140.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/feee2c23ec64/bzImage-eb708140.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/c5c0a12afa51/mount_2.gz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1d8c82e66f2e76b6b427@syzkaller.appspotmail.com
> 
> loop0: detected capacity change from 0 to 32768
> XFS (loop0): Mounting V5 Filesystem
> XFS (loop0): Log inconsistent (didn't find previous header)
> XFS: Assertion failed: 0, file: fs/xfs/xfs_log_recover.c, line: 429

Not a bug. Not even close to a bug.

The kernel was clearly ompiled with CONFIG_XFS_DEBUG=y, which will
trigger debug asserts when things go wrong in ways that should not
ever happen in normal circumstances.

Turn off CONFIG_XFS_DEBUG, and this failure will return
-EFSCORRUPTED as expected because syzbot fed it a corrupt log. THe
mount will simply fail as you'd expect given the malicious
corruption that syzbot has performed.

If syzbot is going to maliciously corrupt XFS filesytsems and then
try to abuse them, then syzbot has two choices. Either:

1. do not enable CONFIG_XFS_DEBUG; or
2. do not report the inevitable stream of ASSERT failures that will
   be encountered to the XFS list.

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-11-22  4:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  4:14 [syzbot] kernel BUG in assfail syzbot
2022-11-22  4:35 ` Dave Chinner [this message]
2022-11-24  8:07   ` Marco Elver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221122043504.GR3600936@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=syzbot+1d8c82e66f2e76b6b427@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox