Date: Wed, 1 Jul 2015 16:37:03 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285011 - head/sys/amd64/amd64 Message-ID: <201507011637.t61Gb34r022355@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Jul 1 16:37:03 2015 New Revision: 285011 URL: https://svnweb.freebsd.org/changeset/base/285011 Log: Disallow a debugger on 64bit system to set fs/gs bases of the 32bit process beyond the end of the process address space. Such setting is not dangerous to the kernel integrity, but it causes confusing application misbehaviour. Sponsored by: The FreeBSD Foundation MFC after: 12 days Modified: head/sys/amd64/amd64/ptrace_machdep.c Modified: head/sys/amd64/amd64/ptrace_machdep.c ============================================================================== --- head/sys/amd64/amd64/ptrace_machdep.c Wed Jul 1 15:54:13 2015 (r285010) +++ head/sys/amd64/amd64/ptrace_machdep.c Wed Jul 1 16:37:03 2015 (r285011) @@ -231,7 +231,7 @@ cpu_ptrace(struct thread *td, int req, v error = copyin(addr, &rv, sizeof(rv)); if (error != 0) break; - if (rv >= VM_MAXUSER_ADDRESS) { + if (rv >= td->td_proc->p_sysent->sv_maxuser) { error = EINVAL; break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507011637.t61Gb34r022355>