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
This commit is contained in:
parent
02e9fc7858
commit
3ce8c94f29
@ -231,7 +231,7 @@ cpu_ptrace(struct thread *td, int req, void *addr, int data)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user