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: <20110328174230.GB11649@redhat.com>
Date:	Mon, 28 Mar 2011 19:42:30 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland Dreier <roland@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Julien Tinnes <jln@...gle.com>,
	Klaus Dittrich <kladit@...or.de>
Subject: Re: [PATCH] Allow rt_sigqueueinfo and rt_tgsigqueueinfo to use
	si_code == SI_ASYNCIO

On 03/28, Roland Dreier wrote:
>
> Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo
> from spoofing the signal code") made the check on si_code too strict:
> glibc's aio implementation wants to queue signals with SI_ASYNCIO, and
> indeed glibc's tst-aio4 fails with the patched kernel.
>
> Fix this by loosening the new check to allow SI_ASYNCIO as well.

Heh.

> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2437,7 +2437,7 @@ SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
>  	/* Not even root can pretend to send signals from the kernel.
>  	 * Nor can they impersonate a kill()/tgkill(), which adds source info.
>  	 */
> -	if (info.si_code != SI_QUEUE) {
> +	if (info.si_code != SI_QUEUE && info.si_code != SI_ASYNCIO) {

I am starting to think that "plan B" was better.

	if (info.si_code >= 0 || info.si_code == SI_TKILL)
		return -EPERM;

Although we should probably keep WARN_ON_ONCE() anyway.

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