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] [day] [month] [year] [list]
Message-ID: <4651790A.2050703@uni-greifswald.de>
Date:	Mon, 21 May 2007 12:48:42 +0200
From:	Philipp Kohlbecher <pk031698@...-greifswald.de>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Dave Jones <davej@...emonkey.org.uk>,
	Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
	linux-assembly@...r.kernel.org
Subject: Re: [PATCH 2.6.21.1] i386: save registers before intra-privilege
 syscall

H. Peter Anvin wrote:
> Sticking kernel mode values in those fields would add no value, except
> as a poison (since %ss == KERNEL_DS and would cause a #GP(0) if it ever
> reached IRET.)  If anything, those fields should be pushed as zero or
> some other poison bits.  That would be slightly better than what's there
> now, which is whatever garbage happens to be on the stack.  Pushing the
> kernel SS:ESP is just plain wrong (not to mention that the way you do it
> doesn't even produce the right value for ESP -- you'd have to save away
> ESP before you push SS.)

That's true. The xss and esp fields of the pt_regs struct always contain
either garbage (for interrupts occuring while in kernel mode) or
user-mode values (for interrupts occuring while in user mode).
So, filling these fields with kernel-mode values indeed doesn't make
much sense.

Allocating space on the stack and poisoning those values would make
sense, though, so I will modify the patch accordingly and resend it.

Thank you for your feedback!

- Philipp Kohlbecher
-
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