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-next>] [day] [month] [year] [list]
Message-Id: <1153836816.7104.70.camel@moss-spartans.epoch.ncsc.mil>
Date:	Tue, 25 Jul 2006 10:13:36 -0400
From:	Stephen Smalley <sds@...ho.nsa.gov>
To:	Venkat Yekkirala <vyekkirala@...stedcs.com>,
	lkml <linux-kernel@...r.kernel.org>,
	James Morris <jmorris@...ei.org>, Andrew Morton <akpm@...l.org>
Subject: [patch 1/1] selinux: fix bug in security_compute_sid

From: Venkat Yekkirala <vyekkirala@...stedcs.com>

Initializes newcontext sooner to allow for its destruction in all cases.
Please apply for 2.6.18.

Signed-off-by: Venkat Yekkirala <vyekkirala@...stedCS.com>
Signed-off-by: Stephen Smalley <sds@...ho.nsa.gov>

---

 security/selinux/ss/services.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -X /home/sds/dontdiff -rup linux-2.6.18-rc2-git2/security/selinux/ss/services.c linux-2.6.18-rc2-git2-x/security/selinux/ss/services.c
--- linux-2.6.18-rc2-git2/security/selinux/ss/services.c	2006-07-24 11:25:49.000000000 -0400
+++ linux-2.6.18-rc2-git2-x/security/selinux/ss/services.c	2006-07-25 08:11:58.000000000 -0400
@@ -833,6 +833,8 @@ static int security_compute_sid(u32 ssid
 		goto out;
 	}
 
+	context_init(&newcontext);
+
 	POLICY_RDLOCK;
 
 	scontext = sidtab_search(&sidtab, ssid);
@@ -850,8 +852,6 @@ static int security_compute_sid(u32 ssid
 		goto out_unlock;
 	}
 
-	context_init(&newcontext);
-
 	/* Set the user identity. */
 	switch (specified) {
 	case AVTAB_TRANSITION:

-- 
Stephen Smalley
National Security Agency

-
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