From: Dave Jones <davej@codemonkey.org.uk>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 4.7-rc7: use-after-free in proc_map_files_readdir
Date: Tue, 19 Jul 2016 14:33:27 -0400 [thread overview]
Message-ID: <20160719183327.GA22621@codemonkey.org.uk> (raw)
In-Reply-To: <20160719162036.GG2356@ZenIV.linux.org.uk>
On Tue, Jul 19, 2016 at 05:20:36PM +0100, Al Viro wrote:
> On Tue, Jul 19, 2016 at 11:31:45AM -0400, Dave Jones wrote:
> > On Tue, Jul 19, 2016 at 02:16:36PM +0300, Alexey Dobriyan wrote:
> > > > BUG: KASAN: use-after-free in proc_map_files_readdir+0x2e3/0x5a0 at addr ffff88044feb2044
> > >
> > > Just in case can you addr2line this address or post disassembly?
> >
> > http://codemonkey.org.uk/junk/fs_proc_base.dis.txt
> >
> > Which by my math, looks to be..
> >
> > 7253: 41 8b 87 84 00 00 00 mov 0x84(%r15),%eax
> > info.len = snprintf(info.name,
>
> The entire expression is
> info.len = snprintf(info.name,
> sizeof(info.name), "%lx-%lx",
> vma->vm_start, vma->vm_end);
> and we have
> * address of array field in local structure.
> * constant
> * string literal
> * two longs fetched from *vma, that being done under ->mmap_sem
> * call of snprintf
> * store into a field of local structure.
> The only ways to get use-after-free in that would be to have *vma freed
> under you or have the same happen to your stack frame.
>
> Could you dump the relevant part of vmlinux objdump, rather than whatever
> you've used on base.o? Having relocations resolved makes it much easier
> to figure out... Or just dump that vmlinux on anonftp somewhere...
http://codemonkey.org.uk/junk/vmlinux.gz
Dave
next prev parent reply other threads:[~2016-07-19 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 11:16 4.7-rc7: use-after-free in proc_map_files_readdir Alexey Dobriyan
2016-07-19 15:31 ` Dave Jones
2016-07-19 16:20 ` Al Viro
2016-07-19 18:33 ` Dave Jones [this message]
2016-07-19 19:38 ` Al Viro
2016-07-19 19:47 ` Dave Jones
2016-07-20 13:14 ` Dave Jones
2016-07-19 19:28 ` Alexey Dobriyan
-- strict thread matches above, loose matches on Subject: below --
2016-07-18 23:24 Dave Jones
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=20160719183327.GA22621@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.