diff options
author | nectar <nectar@FreeBSD.org> | 2003-08-10 23:04:55 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-08-10 23:04:55 +0000 |
commit | f5b9f87e772a6fcee8bcad474c3fd99d063c15d4 (patch) | |
tree | 12f0209fc6a10880cdeb076f627efa787cd2a715 /sys/kern | |
parent | 09416455b19e2f92a8958f72868349089319992a (diff) | |
download | FreeBSD-src-f5b9f87e772a6fcee8bcad474c3fd99d063c15d4.zip FreeBSD-src-f5b9f87e772a6fcee8bcad474c3fd99d063c15d4.tar.gz |
Add or correct range checking of signal numbers in system calls and
ioctls.
In the particular case of ptrace(), this commit more-or-less reverts
revision 1.53 of sys_process.c, which appears to have been erroneous.
Reviewed by: iedowse, jhb
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 3e38319..bdecbf3 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -525,8 +525,8 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) case PT_STEP: case PT_CONTINUE: case PT_DETACH: - /* XXX data is used even in the PT_STEP case. */ - if (req != PT_STEP && (unsigned)data > _SIG_MAXSIG) { + /* Zero means do not send any signal */ + if (data < 0 || data > _SIG_MAXSIG) { error = EINVAL; goto fail; } |