lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Mar 2012 20:42:55 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [git pull] vfs part 2

On Sat, Mar 31, 2012 at 08:39:13PM +0100, Al Viro wrote:
> On Sat, Mar 31, 2012 at 12:29:41PM -0700, Linus Torvalds wrote:
> > On Sat, Mar 31, 2012 at 11:57 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
> > >
> > > Works here... ?OK, that makes selinuxfs one the most likely suspect; let
> > > me check if I can reproduce any crap with that... ?Do you see anything
> > > selinux-related in the call chain, BTW?
> > 
> > Yup.The oops scrolled off my screen, but the call chain was:
> > 
> >  init_sel_fs -> kernel_mount_data -> vfs_kern_mount -> mount_fs ->
> > sel_mount -> mount_single -> (scrolled off)
> > 
> > and then the actual oops happens in d_alloc+0x17, which is
> > "parent->d_sb", so parent was NULL or something (the register state
> > also scrolled off, and I didn't check the fault address, so it could
> > have been some other invalid pointer too).
> 
> Sigh...  sel_make_dir(), last line.  Should be return dentry, is return 0...
> Fixes the problem here (I've managed to reproduce it).

IOW, the incremental is

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 364b784..d7018bf 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1804,7 +1804,7 @@ static struct dentry *sel_make_dir(struct dentry *dir, const char *name,
 	/* bump link count on parent directory, too */
 	inc_nlink(dir->d_inode);
 
-	return 0;
+	return dentry;
 }
 
 static int sel_fill_super(struct super_block *sb, void *data, int silent)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ