[OpenWrt-Devel] [PATCH procd 1/2] jail: SIGSEGV must not be forwarded to the child process
Leonardo Mörlein
me at irrelefant.net
Thu May 7 20:58:24 EDT 2020
A segfault in ujail caused ujail to hang with no chance to abort.
Raising the debug level revealed that SIGSEGV was delivered to
the child process instead of handled directly by ujail. The
corresponding debug message was triggered infinitely again and
again:
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
forwarding signal 11 to the jailed process
[...]
Signed-off-by: Leonardo Mörlein <me at irrelefant.net>
---
jail/jail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jail/jail.c b/jail/jail.c
index 8ae477c..67d4cad 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -775,7 +775,7 @@ int main(int argc, char **argv)
if (!sigismember(&sigmask, i))
continue;
- if ((i == SIGCHLD) || (i == SIGPIPE))
+ if ((i == SIGCHLD) || (i == SIGPIPE) || (i == SIGSEGV))
continue;
s.sa_handler = jail_handle_signal;
--
2.26.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list