From: Pavel Machek <pavel@ucw.cz>
To: Jan Beulich <JBeulich@novell.com>
Cc: mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org,
hpa@zytor.com
Subject: Re: [PATCH] x86-64: don't leak kernel register values to 32-bit processes
Date: Sat, 10 Oct 2009 15:27:07 +0200 [thread overview]
Message-ID: <20091010132707.GB8349@elf.ucw.cz> (raw)
In-Reply-To: <4ACDEC070200007800018B57@vpn.id2.novell.com>
On Thu 2009-10-08 12:41:27, Jan Beulich wrote:
> >>> Pavel Machek <pavel@ucw.cz> 07.10.09 11:44 >>>
> >How can userspace "temporarily switch itself" to 64bit mode?
>
> By just determining (or guessing) the 64-bit user mode CS value, and far-
> jumping/calling to an address with this CS as the selector.
>
> >Such ability would lead to very interesting behaviour on 32-bit
> >kernel, I'd say...
>
> That won't work - you have to have a 64-bit kernel: EFER.LME and the L
> bit of some user mode code segment descriptor must be set (or settable).
>
> Consequently a 64-bit kernel could, if it wanted to, make it impossible for
> user mode code to do such switching (and an example of this, where
> security requires it, is 64-bit Xen disallowing 32-bit para-virtual guests
> [kernel or user mode] to switch themselves into 64-bit mode).
I guess we should do just that -- 32-bit application temporary going
64-bit is asking for trouble. How will attached gdb behave? What if I
try the same code on 32-bit machine?
It seems only useful for malware...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-10-10 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 10:22 [PATCH] x86-64: don't leak kernel register values to 32-bit processes Jan Beulich
2009-10-01 9:59 ` [tip:x86/urgent] x86: Don't leak 64-bit " tip-bot for Jan Beulich
2009-10-07 9:44 ` [PATCH] x86-64: don't leak " Pavel Machek
2009-10-08 11:41 ` Jan Beulich
2009-10-10 13:27 ` Pavel Machek [this message]
2009-10-08 18:58 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091010132707.GB8349@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=JBeulich@novell.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox