summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2015-12-26 09:04:47 +0000
committerdchagin <dchagin@FreeBSD.org>2015-12-26 09:04:47 +0000
commit4beab3b76259d4ee784108fd13fc7f47f4124a93 (patch)
tree257f548677bf0c492d2bd0047cd4b0ecc63aac02 /sys/compat
parent069b2b75f344cda0d1dbdb48d4f52e798f0b0127 (diff)
downloadFreeBSD-src-4beab3b76259d4ee784108fd13fc7f47f4124a93.zip
FreeBSD-src-4beab3b76259d4ee784108fd13fc7f47f4124a93.tar.gz
Do not allow access to emuldata for non Linux processes.
Pointed out by: mjg@ Security: https://admbugs.freebsd.org/show_bug.cgi?id=679
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_futex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 84fc996..e2aad79 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -1099,6 +1099,8 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
ESRCH);
return (ESRCH);
}
+ if (SV_PROC_ABI(td2->td_proc) != SV_ABI_LINUX)
+ return (EPERM);
em = em_find(td2);
KASSERT(em != NULL, ("get_robust_list: emuldata notfound.\n"));
OpenPOWER on IntegriCloud