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] [day] [month] [year] [list]
Message-ID: <1386712837.23829.32.camel@flatline.rdu.redhat.com>
Date:	Tue, 10 Dec 2013 17:00:37 -0500
From:	Eric Paris <eparis@...hat.com>
To:	Anand Avati <avati@...hat.com>
Cc:	Josh Boyer <jwboyer@...oraproject.org>,
	James Morris <jmorris@...ei.org>,
	Eric Sandeen <sandeen@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: SELinux change in 3.13 causes sync hang

On Tue, 2013-12-10 at 13:58 -0800, Anand Avati wrote:
> On 12/10/13, 12:35 PM, Eric Paris wrote:
> > On Tue, 2013-12-10 at 15:25 -0500, Eric Paris wrote:
> >
> >> I'll try to write a patch to fix that logic...
> >
> > Anand,
> >
> > How about something like (untested but it compiles):
> 
> 
> Sorry, it took me a while to compare the committed patch and my original 
> submission. The original patch did not have the subtype matching issue 
> (but had a different issue) and it looks like this bug has come in the 
> reworked/committed patch. I think the fix you have pasted below works.

I fix one bug and break another, huh?  It probably won't be until
tomorrow that I have a place I can test this fix...

-Eric


> 
> Reviewed-by: Anand Avati <avati@...hat.com>
> 
> Thanks,
> Avati
> 
> >
> > diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
> > index ee470a0..2b437fc8 100644
> > --- a/security/selinux/ss/services.c
> > +++ b/security/selinux/ss/services.c
> > @@ -2349,9 +2359,17 @@ int security_fs_use(struct super_block *sb)
> >   		if (strncmp(fstype, c->u.name, baselen))
> >   			continue;
> >
> > -		/* if there is no subtype, this is the one! */
> > -		if (!subtype)
> > -			break;
> > +		/* current mount has no subtype */
> > +		if (!subtype) {
> > +			/*
> > +			 * if there is no subtype in policy this is our match
> > +			 * if there is a subtype in policy keep looking,
> > +			 */
> > +			if (baselen == strlen(c->u.name))
> > +				break;
> > +			else
> > +				continue;
> > +		}
> >
> >   		/* skip past the base in this entry */
> >   		sub = c->u.name + baselen;
> >
> >
> 


--
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