mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@it.uu.se>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>,
	Mikael Pettersson <mikpe@it.uu.se>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86: ia32_signal: remove unnecessary padding
Date: Thu, 13 Nov 2008 09:45:12 +0100	[thread overview]
Message-ID: <18715.59672.641830.690773@harpo.it.uu.se> (raw)
In-Reply-To: <491B1C7C.5000906@zytor.com>

H. Peter Anvin writes:
 > Hiroshi Shimamoto wrote:
 > > H. Peter Anvin wrote:
 > >> Mikael Pettersson wrote:
 > >>> It does cause each signal delivery to leak 2 uninitialised
 > >>> kernel bytes to the end of retcode[], which seems unnecessary.
 > >> Not just unnecessary, it is a huge no-no for security.
 > > 
 > > Am I missing important thing?
 > > The frame->retcode is 8 bytes and packed structure with padding
 > > is 10 bytes each, and the code is copied to user stack 8 bytes only.
 > > 
 > > err |= __copy_to_user(frame->retcode, &code, 8);
 > > 
 > > I don't think the behavior is changed.
 > > 
 > 
 > Ah, nevermind, then.  Then it fine, obviously.

Agreed. I wonder how on earth those templates ended
up as 10 bytes large when retcode[] always has been
8 bytes.

  reply	other threads:[~2008-11-13  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12  3:09 [PATCH 1/2] x86: signal_32: introduce retcode and rt_retcode Hiroshi Shimamoto
2008-11-12  3:11 ` [PATCH 2/2] x86: ia32_signal: remove unnecessary padding Hiroshi Shimamoto
2008-11-12 11:29   ` Ingo Molnar
2008-11-12 12:33     ` Mikael Pettersson
2008-11-12 17:12       ` H. Peter Anvin
2008-11-12 18:02         ` Hiroshi Shimamoto
2008-11-12 18:12           ` H. Peter Anvin
2008-11-13  8:45             ` Mikael Pettersson [this message]
2008-11-13 17:38               ` H. Peter Anvin
2008-11-12 12:56   ` Andi Kleen
2008-11-12 18:34     ` Hiroshi Shimamoto

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=18715.59672.641830.690773@harpo.it.uu.se \
    --to=mikpe@it.uu.se \
    --cc=h-shimamoto@ct.jp.nec.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

all inboxes | Powered by JetHome®