linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sasha.levin@oracle.com>
To: Dave Jones <davej@redhat.com>, Jan Kara <jack@suse.cz>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: fs: gpf in simple_setattr
Date: Wed, 26 Mar 2014 11:00:49 -0400	[thread overview]
Message-ID: <5332EBA1.4080701@oracle.com> (raw)
In-Reply-To: <20140326055350.GA21267@redhat.com>

On 03/26/2014 01:53 AM, Dave Jones wrote:
> On Tue, Mar 25, 2014 at 10:12:29PM +0100, Jan Kara wrote:
>
>   > This fixes an oops triggered by trinity when it tried mounting
>   > anon_inodefs which overwrote anon_inode_inode pointer while other CPU
>   > has been in anon_inode_getfile() between ihold() and d_instantiate().
>   > Thus effectively creating dentry pointing to an inode without holding a
>   > reference to it.
>
> <raises eyebrows>
>
> Sasha, do you have changes to trinity's syscall/mount.c ?
> It's kind of miraculous we managed to get the type arg right
> there, because right now we're just passing a random address as an arg.
> The only way that could work is if we randomly managed to do an allocation,
> and then a seek & read from /proc/filesystems to that buffer.  If you're
> lucky enough to get all those conditions right from rand() calls, you should
> probably give up on kernel hacking and buy some powerball tickets.
>
> We should add some code to make that only return strings from /proc/filesystems,
> which makes me wonder if you already did that..

Almost :)

I'm mounting every filesystem under /prov/filesystems into trinity's victims path
before trinity starts, so it gets to fuzz every filesystem known to the kernel.

For nodev filesystems it just mounts then and for nodev ones it will try to
mkfs.$fs a block device and mount that.

So basically I'm not surprised by the explanation for that bug or that trinity
has triggered it.


Thanks,
Sasha



      reply	other threads:[~2014-03-26 15:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  0:25 fs: gpf in simple_setattr Sasha Levin
2014-01-08 16:00 ` Sasha Levin
2014-03-01 20:05   ` Sasha Levin
2014-03-02  3:35     ` Linus Torvalds
2014-03-03  2:01       ` Sasha Levin
2014-03-03 21:40     ` Jan Kara
2014-03-05  0:00       ` Sasha Levin
2014-03-05 12:45         ` Jan Kara
2014-03-06 16:02           ` Sasha Levin
2014-03-08  2:14             ` Sasha Levin
2014-03-10 10:43               ` Jan Kara
2014-03-10 14:13                 ` Sasha Levin
2014-03-24 14:42                   ` Sasha Levin
2014-03-24 21:48                     ` Jan Kara
2014-03-25  0:44                       ` Sasha Levin
2014-03-25 17:33                         ` Jan Kara
2014-03-25 17:51                           ` Sasha Levin
2014-03-25 21:12                             ` Jan Kara
2014-03-26  0:12                               ` Sasha Levin
2014-03-26  0:41                               ` Linus Torvalds
2014-03-26  5:34                                 ` Jan Kara
2014-03-26  5:53                               ` Dave Jones
2014-03-26 15:00                                 ` Sasha Levin [this message]

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=5332EBA1.4080701@oracle.com \
    --to=sasha.levin@oracle.com \
    --cc=davej@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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).