All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Kees Cook <kees.cook@canonical.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	"David S. Miller" <davem@davemloft.net>,
	stable@kernel.org
Subject: Re: [PATCH] ipc: initialize structure memory to zero for shmctl
Date: Thu, 7 Oct 2010 02:21:36 +0100	[thread overview]
Message-ID: <20101007012136.GS19804@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20101007001031.GX14666@outflux.net>

On Wed, Oct 06, 2010 at 05:10:31PM -0700, Kees Cook wrote:
> The old shm interface will leak a few bytes of stack contents. Explicitly
> initialize the structure to zero-fill the untouched fields.

Umm...  I wonder if we ever have gaps in there; note that gaps between
the fields are _not_ initialized in compound literals.  Yes, I realize
that it's a separate problem, but explicit memset() prior to initializations
of fields might be a better solution, covering both.

  reply	other threads:[~2010-10-07  1:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  0:10 [PATCH] ipc: initialize structure memory to zero for shmctl Kees Cook
2010-10-07  1:21 ` Al Viro [this message]
2010-10-07  2:13   ` Kees Cook

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=20101007012136.GS19804@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jslaby@suse.cz \
    --cc=kees.cook@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.