lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071202171805.GA14701@tv-sign.ru>
Date:	Sun, 2 Dec 2007 20:18:05 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Simon Holm Th?gersen <odie@...aau.dk>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Davide Libenzi <davidel@...ilserver.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Roland McGrath <roland@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] fix the long standing exec vs kill race

On 12/02, Simon Holm Th?gersen wrote:
> 
> s??n, 02 12 2007 kl. 18:14 +0300, skrev Oleg Nesterov:
> > 
> > Please comment, I think at least the idea is promising.
> > 
> I have an issue that sounds related, but I might be completely off. I
> would expect the simple attached program to keep receiving the same
> signal, i.e. respond to
> 	killall signal-exec -s SIGHUP
> 
> I tried your patches, but they didn't help.
> 
> Any ideas?
> 
> 
> Simon Holm Th??gersen

> #include <signal.h>
> #include <stdio.h>
> #include <unistd.h>
> 
> static char **argv_;
> 
> static void handler(int signal)
> {
> 	printf("got signal %d\n", signal);
> 	execv(argv_[0], argv_);
> }
> 
> int main(int argc, char *argv[])
> {
> 	printf("spawned\n");
> 	argv_ = argv;
> 	if (signal(SIGTERM, handler) == SIG_ERR)
> 		err(1, "could not set signal handler for SIGTERM");
> 	if (signal(SIGHUP, handler) == SIG_ERR)
> 		err(1, "could not set signal handler for SIGTERM");
> 	sleep(60);
> 	return 0;
> }
> 

I think this is another issue which should be solved (?).

exec() from the signal handler doesn't do sys_sigreturn(), so we don't unblock
the signal, and it remains blocked after exec().

Hmm. Is this linux bug, or application bug?

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ