Skip to contentSkip to conversation

SELINUX: Bug fix in security_sid_mls_copy

PATCH In review Venkat Yekkirala 2 participants 2 messages Sep 19, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SELINUX: Bug fix in security_sid_mls_copy

The following fixes a bug where random mem is being tampered with in the non-mls case; encountered by Jashua Brindle on a gentoo box.

---

PS: NOT SURE IF THIS ALSO NEEDS TO BE SENT TO NETDEV. PLEASE LET ME KNOW IF I SHOULD.

security/selinux/ss/services.c +1 -1
index 27ee28c..7eb69a6 100644
@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 m
 	u32 len;
 	int rc = 0;
 
-	if (!ss_initialized) {
+	if (!ss_initialized || !selinux_mls_enabled) {
 		*new_sid = sid;
 		goto out;
 	}

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Venkat Yekkirala

The following fixes a bug where random mem is being tampered with in the non-mls case; encountered by Jashua Brindle on a gentoo box.

Quoted 4 lines

---

PS: NOT SURE IF THIS ALSO NEEDS TO BE SENT TO NETDEV. PLEASE LET ME KNOW IF I SHOULD.

Yes. Note that it is for 2.6.19 as well as a bug fix for the prior patches.

Quoted 14 lines
security/selinux/ss/services.c +1 -1
index 27ee28c..7eb69a6 100644
@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 m
 	u32 len;
 	int rc = 0;
 
-	if (!ss_initialized) {
+	if (!ss_initialized || !selinux_mls_enabled) {
 		*new_sid = sid;
 		goto out;
 	}
Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.