All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Joe Perches <joe@perches.com>,
	Luis Henriques <luis.henriques@canonical.com>,
	Avijit Kanti Das <avijitnsec@codeaurora.org>,
	"David S . Miller" <davem@davemloft.net>,
	Ben Hutchings <ben@decadent.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()
Date: Tue, 23 Aug 2016 19:38:28 +0300	[thread overview]
Message-ID: <CAPAsAGzNcGpf+TPcqymGNdB7POoz3Oj=VLwvvtz6yWJf1UX0=g@mail.gmail.com> (raw)
In-Reply-To: <1471966619.14381.21.camel@edumazet-glaptop3.roam.corp.google.com>

2016-08-23 18:36 GMT+03:00 Eric Dumazet <eric.dumazet@gmail.com>:
> On Tue, 2016-08-23 at 08:05 -0700, Joe Perches wrote:
>
>> A compiler does not have a standards based requirement to
>> initialize arbitrary padding bytes.
>>
>> I believe gcc always does zero all padding anyway.
>
> I would not worry for kernel code, because the amount of scrutiny there
> will be enough to 'fix potential bugs' [1], but a lot of user land code
> would suffer from various bugs as well that might sit there forever.
>
> [1] Also, most call sites in the kernel are using same call stack, so
> the offset of '1-7 leaked bytes' vs kernel stack is constant, making
> exploits quite challenging.
>
> Even if the current standards are lazy (are they, I did not check ?),
> security needs would call for a sane compiler behavior and changing the
> standards accordingly.
>

 C11 guarantees zeroed padding.

  reply	other threads:[~2016-08-23 16:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 13:41 CVE-2014-9900 fix is not upstream Luis Henriques
2016-08-23 13:41 ` net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol() Luis Henriques
2016-08-23 14:06   ` Joe Perches
     [not found]     ` <CAOp4FwRxfE61azV78TZ7EKESQZzRU2Pfkc2GJ9j3MV7pr80qew@mail.gmail.com>
2016-08-23 15:40       ` Joe Perches
2016-08-23 14:21   ` Eric Dumazet
2016-08-23 15:05     ` Joe Perches
2016-08-23 15:36       ` Eric Dumazet
2016-08-23 16:38         ` Andrey Ryabinin [this message]
2016-08-23 16:46         ` Edward Cree
2016-08-23 17:15       ` Vegard Nossum
2016-08-23 17:33     ` Ben Hutchings
2016-08-23 16:40 ` CVE-2014-9900 fix is not upstream David Miller
2016-08-23 17:35   ` Ben Hutchings
2016-08-23 18:24     ` David Miller
2016-08-23 20:09       ` Al Viro
2016-08-23 20:34         ` Joe Perches
2016-08-23 20:49           ` Lennart Sorensen
2016-08-23 21:25             ` Al Viro
2016-08-24 14:03               ` Lennart Sorensen
2016-08-24 20:36                 ` Hannes Frederic Sowa
2016-08-25 12:40                   ` Johannes Berg
2016-08-25 12:41                     ` Johannes Berg
2016-08-25 15:14                   ` One Thousand Gnomes

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='CAPAsAGzNcGpf+TPcqymGNdB7POoz3Oj=VLwvvtz6yWJf1UX0=g@mail.gmail.com' \
    --to=ryabinin.a.a@gmail.com \
    --cc=avijitnsec@codeaurora.org \
    --cc=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.henriques@canonical.com \
    --cc=netdev@vger.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.