All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: adobriyan@gmail.com
Cc: eric.dumazet@gmail.com, steffen.klassert@secunet.com,
	edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net: move padding in struct skb_shared_info
Date: Tue, 11 Apr 2017 10:52:26 -0400 (EDT)	[thread overview]
Message-ID: <20170411.105226.1838701404197948502.davem@davemloft.net> (raw)
In-Reply-To: <CACVxJT9ixBPtO4JN=dgLT_gbDOQ8tL_kTFfoYmDahaomatCKEw@mail.gmail.com>

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Tue, 11 Apr 2017 12:41:08 +0300

> On Mon, Apr 10, 2017 at 5:43 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> On Mon, 2017-04-10 at 11:07 +0300, Alexey Dobriyan wrote:
>>>  struct skb_shared_info {
>>> -     unsigned short  _unused;
>>>       unsigned char   nr_frags;
>>>       __u8            tx_flags;
>>>       unsigned short  gso_size;
>>
>> Nack
>>
>> This exact placement was discussed at Netconf and Netdev.
>>
>> We had off-by-one errors in the past leading to nr_frags being mangled,
>> and some exploits were quite happy to use these bugs.
>>
>> Some shuffling in shared_info might help us to find other bugs, and give
>> more work to security researchers
> 
> By this logic there should be redzone around every field in networking stack.

It is not a general rule, but a situation we specifically know about
here for this structure and how exploits are actively being coded.

I would like to politely ask that we don't strive so strongly for
"tree wide rules" that we fail to see the need for specific handling
in specific situations as is the case here.

Thank you.

      parent reply	other threads:[~2017-04-11 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  8:07 [PATCH] net: move padding in struct skb_shared_info Alexey Dobriyan
2017-04-10 14:43 ` Eric Dumazet
2017-04-11  9:41   ` Alexey Dobriyan
2017-04-11 14:47     ` Eric Dumazet
2017-04-11 14:52     ` David Miller [this message]

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=20170411.105226.1838701404197948502.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=adobriyan@gmail.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.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 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.