From: Leonardo Mörlein Date: Fri, 8 May 2020 00:58:24 +0000 (+0200) Subject: jail: SIGSEGV must not be forwarded to the child process X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=2e738484c5722cf14e1414be66eeb5110bd2834c;p=project%2Fprocd.git jail: SIGSEGV must not be forwarded to the child process 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 --- 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;