From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
davej@codemonkey.org.uk, hpa@zytor.com, bgerst@didntduck.org,
Riley@Williams.Name, zach@vmware.com
Subject: Re: PROBLEM: x86 alignment check bug
Date: Thu, 9 Sep 2004 18:29:50 +0200 [thread overview]
Message-ID: <315C5E33D6A@vcnet.vc.cvut.cz> (raw)
On 8 Sep 04 at 14:26, Alan Cox wrote:
> On Mer, 2004-09-08 at 00:51, Zachary Amsden wrote:
> > Exception reporting for alignment check violations on x86 is broken
> > (unfortunately, rather badly, and rather hard to fix). Look at the trap
> > function which fills in the si_addr field during an unaligned memory
> > access, 2.6.8.1-mm4+, arch/i386/kernel/traps.c, Line 522:
>
> So it fills in a value with random data that should be zero. Ok thats
> hardly "badly".
These are not random data. It is old value of CR2, which happens to
be address of last page fault which occured on this CPU.
By artifically triggering alignment fault you can find at which virtual
address last pagefault on this CPU occured - so you can have some
additional information channel which can disclose information about
other processes running on your box. And although probably all security
related apps learned that page faults can be sensed from time taken to
answer request, and add random delays to their failure answers, this
additional channel could be used to more precisely determine where
failure occured.
Yes, likelihood that you can use it to hack passwords on your linux box
is zero, but given that currently si_addr reports garbage for alignment
faults (on all x86 processors), why not always report zero (or all F,
or any other constant value or eip) in si_addr? It has same relevance as
any other random value, and when compared with semi-random value it does
not provide an additional information about system behavior.
Best regards,
Petr Vandrovec
next reply other threads:[~2004-09-09 16:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 16:29 Petr Vandrovec [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-09-07 23:51 Zachary Amsden
2004-09-08 0:08 ` David S. Miller
2004-09-08 12:12 ` Gabriel Paubert
2004-09-08 18:26 ` David S. Miller
2004-09-08 13:26 ` Alan Cox
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=315C5E33D6A@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=Riley@Williams.Name \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bgerst@didntduck.org \
--cc=davej@codemonkey.org.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zach@vmware.com \
/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
all inboxes | Powered by JetHome®