linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: butt3rflyh4ck <butterflyhuangxx@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	djwong@kernel.org
Subject: Re: A shift-out-of-bounds in minix_statfs in fs/minix/inode.c
Date: Thu, 22 Jul 2021 10:43:10 +0800	[thread overview]
Message-ID: <CAFcO6XO0GR8GBVD7hT8VL5qey3cCYriMqvt0Dan72i5yVP6FxQ@mail.gmail.com> (raw)
In-Reply-To: <YPhbU/umyUZLdxIw@casper.infradead.org>

On Thu, Jul 22, 2021 at 1:37 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Thu, Jul 22, 2021 at 01:14:06AM +0800, butt3rflyh4ck wrote:
> > ms = (struct minix_super_block *) bh->b_data; /// --------------> set
> > minix_super_block pointer
> > sbi->s_ms = ms;
> > sbi->s_sbh = bh;
> > sbi->s_mount_state = ms->s_state;
> > sbi->s_ninodes = ms->s_ninodes;
> > sbi->s_nzones = ms->s_nzones;
> > sbi->s_imap_blocks = ms->s_imap_blocks;
> > sbi->s_zmap_blocks = ms->s_zmap_blocks;
> > sbi->s_firstdatazone = ms->s_firstdatazone;
> > sbi->s_log_zone_size = ms->s_log_zone_size;  // ------------------>
> > set sbi->s_log_zone_size
>

> So what you're saying is that if you construct a malicious minix image,
> you can produce undefined behaviour?

Yes, the attachment is a reproduction. just compile it and run.

>That's not something we're
> traditionally interested in, unless the filesystem is one customarily
> used for data interchange (like FAT or iso9660).
>

These file systems are my fuzzing targets.


Regards,
 butt3rflyh4ck.


-- 
Active Defense Lab of Venustech

  parent reply	other threads:[~2021-07-22  2:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 17:14 A shift-out-of-bounds in minix_statfs in fs/minix/inode.c butt3rflyh4ck
2021-07-21 17:37 ` Matthew Wilcox
2021-07-21 19:14   ` Darrick J. Wong
2021-07-22  2:43   ` butt3rflyh4ck [this message]
2021-07-22  2:52     ` Matthew Wilcox
2021-07-22  8:09   ` Dan Carpenter
2021-07-22 21:58   ` Theodore Ts'o
2021-07-22 22:34     ` Randy Dunlap
2021-07-23  9:22     ` Christian Brauner

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=CAFcO6XO0GR8GBVD7hT8VL5qey3cCYriMqvt0Dan72i5yVP6FxQ@mail.gmail.com \
    --to=butterflyhuangxx@gmail.com \
    --cc=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).