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, 31 Jul 2009 14:31:51 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ulrich Drepper <drepper@...hat.com>
cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] information leak in sigaltstack



On Fri, 31 Jul 2009, Linus Torvalds wrote:
> 
> Now, you'd end up with a memset() in that case (since it certainly won't 
> match the offsetof), but my point is, the conditional really looks very 
> arbitrary and rather strange. I'd rather see it unconditional, even if it 
> costs three unnecessary writes or whatever.

.. and if we really do want the conditional, maybe just make it something 
like

	/*
	 * ss_flags is often generally 'int', and may cause
	 * holes in the structure due to alignment.
	 */
	if (alignof(oss.ss_flags) != alignof(oss))
		memset(&oss, 0, sizeof(oss));

instead? That would seem to be less subtle, and more to-the-point.

			Linus
--
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