mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 01:38:57 +00:00
Close a race condition where num can be larger than tmp, giving the user
too large of a boundary. Reported by: Ilja Van Sprundel
This commit is contained in:
parent
b9804a4b35
commit
f51bf07af8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163345
@ -980,7 +980,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
|||||||
error = copyout(buf, addr, tmp * sizeof(lwpid_t));
|
error = copyout(buf, addr, tmp * sizeof(lwpid_t));
|
||||||
free(buf, M_TEMP);
|
free(buf, M_TEMP);
|
||||||
if (!error)
|
if (!error)
|
||||||
td->td_retval[0] = num;
|
td->td_retval[0] = tmp;
|
||||||
PROC_LOCK(p);
|
PROC_LOCK(p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user