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: <20110330213338.GA20367@redhat.com>
Date:	Wed, 30 Mar 2011 23:33:38 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	jln@...gle.com, torvalds@...ux-foundation.org, gregkh@...e.de,
	ak@...ux.intel.com, linux-kernel@...r.kernel.org,
	stable@...nel.org, tim.bird@...sony.com,
	Roland Dreier <roland@...estorage.com>
Subject: Re: [PATCH] [226/275] Prevent rt_sigqueueinfo and
	rt_tgsigqueueinfo from spoofing the signal code

On 03/30, Andi Kleen wrote:
>
> --- linux-2.6.35.y.orig/kernel/signal.c	2011-03-29 22:50:25.616602954 -0700
> +++ linux-2.6.35.y/kernel/signal.c	2011-03-29 23:03:02.941224912 -0700
> @@ -2410,9 +2410,13 @@
>  		return -EFAULT;
>
>  	/* Not even root can pretend to send signals from the kernel.
> -	   Nor can they impersonate a kill(), which adds source info.  */
> -	if (info.si_code >= 0)
> +	 * Nor can they impersonate a kill()/tgkill(), which adds source info.
> +	 */
> +	if (info.si_code != SI_QUEUE) {
> +		/* We used to allow any < 0 si_code */
> +		WARN_ON_ONCE(info.si_code < 0);
>  		return -EPERM;

Oh, please don't.

Quoting Roland:

	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.

If stable needs this change, then it probably needs

	Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo
	commit 243b422af9ea9af4ead07a8ad54c90d4f9b6081a

as well.

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