From owner-svn-src-head@freebsd.org Sat Dec 26 09:04:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED91AA5196A; Sat, 26 Dec 2015 09:04:48 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD4A51778; Sat, 26 Dec 2015 09:04:48 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBQ94l0B055556; Sat, 26 Dec 2015 09:04:47 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBQ94lpV055555; Sat, 26 Dec 2015 09:04:47 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201512260904.tBQ94lpV055555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 26 Dec 2015 09:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292743 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 09:04:49 -0000 Author: dchagin Date: Sat Dec 26 09:04:47 2015 New Revision: 292743 URL: https://svnweb.freebsd.org/changeset/base/292743 Log: Do not allow access to emuldata for non Linux processes. Pointed out by: mjg@ Security: https://admbugs.freebsd.org/show_bug.cgi?id=679 Modified: head/sys/compat/linux/linux_futex.c Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Sat Dec 26 06:13:01 2015 (r292742) +++ head/sys/compat/linux/linux_futex.c Sat Dec 26 09:04:47 2015 (r292743) @@ -1099,6 +1099,8 @@ linux_get_robust_list(struct thread *td, 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"));