From 6e5549717a4e9fabbb71e5aba35a488ed826ad09 Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Sat, 26 Dec 2015 09:04:47 +0000 Subject: [PATCH] Do not allow access to emuldata for non Linux processes. Pointed out by: mjg@ Security: https://admbugs.freebsd.org/show_bug.cgi?id=679 --- sys/compat/linux/linux_futex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 84fc996e95b..e2aad790ce2 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"));