mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 1/1] selinux: Fix MLS compatibility off-by-one bug
@ 2006-04-11 16:53 Stephen Smalley
  2006-04-11 22:07 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2006-04-11 16:53 UTC (permalink / raw)
  To: lkml, James Morris, Andrew Morton; +Cc: Ron Yorston

From:  Ron Yorston <rmy@tigress.co.uk>

This patch fixes an off-by-one error in the MLS compatibility code
that was causing contexts with a MLS suffix to be rejected, preventing
sharing partitions between FC4 and FC5.  Bug reported in  
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188068
Please apply, for 2.6.17 if possible.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by:  James Morris <jmorris@redhat.com>

---

 security/selinux/ss/mls.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.16/security/selinux/ss/mls.c.selinux-debug	2006-04-06 19:47:15.000000000 +0100
+++ linux-2.6.16/security/selinux/ss/mls.c	2006-04-06 19:47:24.000000000 +0100
@@ -264,7 +264,7 @@ int mls_context_to_sid(char oldc,
 
 	if (!selinux_mls_enabled) {
 		if (def_sid != SECSID_NULL && oldc)
-			*scontext += strlen(*scontext);
+			*scontext += strlen(*scontext)+1;
 		return 0;
 	}
 

-- 
Stephen Smalley
National Security Agency


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-12 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 16:53 [patch 1/1] selinux: Fix MLS compatibility off-by-one bug Stephen Smalley
2006-04-11 22:07 ` Andrew Morton
2006-04-12 12:37   ` Stephen Smalley

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®