Re: 4.7-rc7: use-after-free in proc_map_files_readdir

From: Al Viro
Date: Tue Jul 19 2016 - 15:39:27 EST


On Tue, Jul 19, 2016 at 02:33:27PM -0400, Dave Jones wrote:
> > 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

OK, it's actually about fetching ->f_mode in
info.mode = vma->vm_file->f_mode;

%r15 points contains vma->vm_file at that point, and 0x84 is the offset of
f_mode in struct file on your config from hell (due to spinlock_t size
exploding on lockdep et.al.)

Interesting... Do you have a reproducer for that?