[PATCH v5 5/5] sidechannel: Linux Security Module for sidechannel

From
James Morris <jmorris@namei.org>
Date
2018-09-27 21:45:24
Also in
lkml, selinux
Reply to
Casey Schaufler, 2018-09-26
On Wed, 26 Sep 2018, Casey Schaufler wrote:
quoted hunk ↗ jump to hunk
+	/*
+	 * Namespace checks. Considered safe if:
+	 *	cgroup namespace is the same
+	 *	User namespace is the same
+	 *	PID namespace is the same
+	 */
+	if (current->nsproxy)
+		ccgn = current->nsproxy->cgroup_ns;
+	if (p->nsproxy)
+		pcgn = p->nsproxy->cgroup_ns;
+	if (ccgn != pcgn)
+		return -EACCES;
+	if (current->cred->user_ns != p->cred->user_ns)
+		return -EACCES;
+	if (task_active_pid_ns(current) != task_active_pid_ns(p))
+		return -EACCES;
+	return 0;
I really don't like the idea of hard-coding namespace security semantics 
in an LSM.  Also, I'm not sure if these semantics make any sense.

It least make it user configurable.


-- 
James Morris
[off-list ref]
Thread (27 messages) 27 messages, 6 authors, last reply 2018-10-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help