svn commit: r285011 - head/sys/amd64/amd64
Konstantin Belousov
kib at FreeBSD.org
Wed Jul 1 16:37:04 UTC 2015
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;
}
More information about the svn-src-head
mailing list