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]
Date:	Fri, 23 May 2008 01:18:09 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Roland McGrath <roland@...hat.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Austin Clements <amdragon+kernelbugzilla@....edu>,
	Ingo Molnar <mingo@...e.hu>, john stultz <johnstul@...ibm.com>,
	Michael Kerrisk <mtk.manpages@...glemail.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] signals: sigqueue_free: don't free sigqueue if it is queued

On 05/22, Roland McGrath wrote:
>
> > This is not enough. Again, we remove and free sigqueue but don't discard
> > the pending signal. (and we must take into account other rt signals with
> > the same si_signo if we want to discard the signal).
> 
> Right, of course.  The sigset_t collecting while checking the queue is the
> only way to do it.  Note that you need to make it:
> 
> 	if (q->info.si_code == SI_TIMER && sig >= SIGRTMIN)
> 
> because a SI_TIMER could be using a legacy_queue signal number.

Argh ;)

I hoped you will not notice this. Because this is a separate problem
which needs a separate discussion.

Please note that send_sigqueue() does not check if legacy_queue signal
is already pending. The recent changes in signal.c carefully preserve
this peculiarity. This is the question I was going to ask 1000 times
but forgot all the time.

So. Let's suppose that (say) SIGHUP is pending, and the posix timer
sends SIGHUP too. In that case the new SIGHUP is added, and if the
previous one was infoless the new one "hides" it: collect_signal()
won't see 2 distinct signals, it will find only 1 signal and clear
the bit in sigpending->signal.

So I think we shouldn't check "sig >= SIGRTMIN", but perhaps send_signal()
should be fixed? Anyway, I believe this is a separate problem.

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