From: Andrew Morton <akpm@linux-foundation.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>,
David Rientjes <rientjes@google.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Dave Jones <davej@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: fs: use after free in /proc/pid/mountinfo
Date: Wed, 9 Jul 2014 13:31:38 -0700 [thread overview]
Message-ID: <20140709133138.c523aa03883be5417a4d19a4@linux-foundation.org> (raw)
In-Reply-To: <20140709142406.GA27561@osiris>
On Wed, 9 Jul 2014 16:24:06 +0200 Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> 058504edd026 ("fs/seq_file: fallback to vmalloc allocation") is suspected to
> cause a crash. Actually I can't reprocude the crash nor would I be able to
> tell how the commit could cause the crash.
> Anyway, I'll be offline for the next 2.5 weeks. So if Sasha could confirm
> that reverting the patch actually does fix the crash, please revert the
> commit, unless somebody else can make sense of the report of course.
>
> I'm still wondering how Sasha could reproduce the crash.
This really sucks :(
I suppose I'll queue up a revert of 058504edd026 as a for-3.16 bandaid.
Sasha, it would be great if you could delve a bit further into this,
see if we can identify a way for others to reproduce the bug.
Did you test that little patchlet which Heiko sent?
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -34,12 +34,7 @@ static void seq_set_overflow(struct seq_file *m)
static void *seq_buf_alloc(unsigned long size)
{
- void *buf;
-
- buf = kmalloc(size, GFP_KERNEL | __GFP_NOWARN);
- if (!buf && size > PAGE_SIZE)
- buf = vmalloc(size);
- return buf;
+ return kmalloc(size, GFP_KERNEL);
}
/**
It would also be interesting to try the opposite: always use vmalloc().
That may make it easier to trigger the bug.
next prev parent reply other threads:[~2014-07-09 20:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 11:55 Sasha Levin
2014-07-03 3:15 ` Sasha Levin
2014-07-03 21:37 ` David Rientjes
2014-07-04 14:55 ` Sasha Levin
2014-07-04 22:35 ` [stable] please do not merge 058504edd026 (was Re: fs: use after free in /proc/pid/mountinfo) David Rientjes
2014-07-07 23:05 ` Greg KH
2014-07-07 23:06 ` Andrew Morton
2014-07-07 23:19 ` Greg KH
2014-07-06 10:04 ` fs: use after free in /proc/pid/mountinfo Heiko Carstens
2014-07-09 14:24 ` Heiko Carstens
2014-07-09 20:31 ` Andrew Morton [this message]
2014-07-09 22:10 ` Sasha Levin
2014-07-09 22:59 ` Andrew Morton
2014-07-15 13:52 ` Sasha Levin
2014-07-15 23:01 ` David Rientjes
2014-07-23 20:57 ` Andrew Morton
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=20140709133138.c523aa03883be5417a4d19a4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=sasha.levin@oracle.com \
--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
all inboxes | Powered by JetHome®