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>] [day] [month] [year] [list]
Date:	Wed, 20 Sep 2006 09:48:43 -0700
From:	Kylene Jo Hall <kjhall@...ibm.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	akpm@...l.org, Serge Hallyn <sergeh@...ibm.com>,
	Mimi Zohar <zohar@...ibm.com>,
	Dave Safford <safford@...ibm.com>, sds@...ho.nsa.gov
Subject: [PATCH] slim: handle failure to register

Thanks to Stephen Smalley for pointing out that we need to securely
handle a failure to register with the LSM security hooks.  This patch
adds a panic in the event that the module is unable to register.

Signed-off-by: Kylene Hall <kjhall@...ibm.com>
Signed-off-by: Mimi Zohar <zohar@...ibm.com>
---
security/slim/slm_main.c |    6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-) 
--- linux-2.6.18-rc6-orig/security/slim/slm_main.c	2006-09-18 16:41:51.000000000 -0500
+++ linux-2.6.18-rc6/security/slim/slm_main.c	2006-09-19 12:48:42.000000000 -0500
@@ -1644,9 +1644,13 @@ int slim_enabled = 1;
 #endif
 static int __init init_slm(void)
 {
+	int rc;
 	if (!slim_enabled)
 		return 0;
 	slm_task_init_alloc_security(current);
-	return register_security(&slm_security_ops);
+	rc = register_security(&slm_security_ops);
+	if (rc != 0)
+		panic("SLIM: Unable to register with kernel\n");
+	return rc;
 }
 security_initcall(init_slm);


-
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