diff options
author | kib <kib@FreeBSD.org> | 2009-12-18 14:27:18 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-12-18 14:27:18 +0000 |
commit | 19ee2b964b9709eff693377561337c93e9ae29ce (patch) | |
tree | afbaddb342c7d034197b9ef5d8707da12f8d1319 /sys | |
parent | 0c4b4a5c2b4a37b1dacf179368080f353b911872 (diff) | |
download | FreeBSD-src-19ee2b964b9709eff693377561337c93e9ae29ce.zip FreeBSD-src-19ee2b964b9709eff693377561337c93e9ae29ce.tar.gz |
Signal 0 is used to check the permission for current process to signal
target one. Since r184058, linux_do_tkill() calls tdsignal() instead of
kill(), without checking for validity of supplied signal number. Prevent
panic when supplied signal is 0 by finishing work after checks.
Found and tested by: scf
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 5910d62..9cc05ed9 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -565,7 +565,7 @@ linux_do_tkill(struct thread *td, l_int tgid, l_int pid, l_int signum) AUDIT_ARG_PROCESS(p); error = p_cansignal(td, p, signum); - if (error) + if (error != 0 || signum == 0) goto out; error = ESRCH; |