svn commit: r200667 - head/sys/compat/linux

[ Available lists | Index of svn-src-head | Month of Dec 2009 | Week of 18 Dec 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Konstantin Belousov <kib@FreeBSD.org>
Date
18 Dec 2009 14:27:18
Subject
svn commit: r200667 - head/sys/compat/linux
Message-ID
200912181427.nBIERI7j094485@svn.freebsd.org


[ Hide this part ]
Author: kib
Date: Fri Dec 18 14:27:18 2009
New Revision: 200667
URL: http://svn.freebsd.org/changeset/base/200667

Log:
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

Modified:
head/sys/compat/linux/linux_signal.c

Modified: head/sys/compat/linux/linux_signal.c
==============================================================================
--- head/sys/compat/linux/linux_signal.c Fri Dec 18 12:10:42 2009 (r200666)
+++ head/sys/compat/linux/linux_signal.c Fri Dec 18 14:27:18 2009 (r200667)
@@ -565,7 +565,7 @@ linux_do_tkill(struct thread *td, l_int

AUDIT_ARG_PROCESS(p);
error = p_cansignal(td, p, signum);
- if (error)
+ if (error != 0 || signum == 0)
goto out;

error = ESRCH;


Elapsed time: 0.073 seconds