[patch 1/1] selinux: Fix MLS compatibility off-by-one bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From:  Ron Yorston <[email protected]>

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 <[email protected]>
Acked-by:  James Morris <[email protected]>

---

 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux