netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: David Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Patrick McHardy <kaber@trash.net>,
	Network Development <netdev@vger.kernel.org>
Subject: Re: Netlink mmap tx security?
Date: Tue, 14 Oct 2014 15:16:46 -0700	[thread overview]
Message-ID: <CALCETrWDSG2EhxBnM8Jm55Ov8PYQ_w3Wf88SKYOB1q1WgRpbEw@mail.gmail.com> (raw)
In-Reply-To: <20141014.160056.2113064815910782529.davem@davemloft.net>

On Tue, Oct 14, 2014 at 1:00 PM, David Miller <davem@davemloft.net> wrote:
> From: Andy Lutomirski <luto@amacapital.net>
> Date: Tue, 14 Oct 2014 12:33:43 -0700
>
>> For full honesty, there is now the machinery developed for memfd
>> sealing, but I can't imagine that this is ever faster than just
>> copying the buffer.
>
> I don't have much motivation to even check if it's a worthwhile
> pursuit at this point.
>
> Someone who wants to can :-)
>
>> I think that the NETLINK_SKB_TX declaration in include/linux/netlink.h
>> should probably go, too.  And there's the last parameter to
>> netlink_set_ring, too, and possibly even the nlk->tx_ring struct
>> itself.
>
> Agreed on all counts, here is the new patch:
>
> ====================
> [PATCH] netlink: Remove TX mmap support.
>
> There is no reasonable manner in which to absolutely make sure that another
> thread of control cannot write to the pages in the mmap()'d area and thus
> make sure that netlink messages do not change underneath us after we've
> performed verifications.
>
> Reported-by: Andy Lutomirski <luto@amacapital.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>

Looks sensible to me, but I have no idea how to test it.

It's at least remotely possible that there's something that assumes
that assumes that the availability of NETLINK_RX_RING implies
NETLINK_TX_RING, which would be unfortunate.

--Andy

  reply	other threads:[~2014-10-14 22:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALCETrWsCqy7KEKPTOeHjrO1c2JE1E_seO_J+yA=sYFhS11NXQ@mail.gmail.com>
2014-05-12 21:08 ` Netlink mmap tx security? Andy Lutomirski
2014-10-11 22:29   ` Andy Lutomirski
2014-10-11 23:09     ` David Miller
2014-10-14 19:19     ` David Miller
2014-10-14 19:33       ` Andy Lutomirski
2014-10-14 20:00         ` David Miller
2014-10-14 22:16           ` Andy Lutomirski [this message]
2014-10-15  2:01             ` David Miller
2014-10-15  2:03               ` Andy Lutomirski
2014-10-15  2:09                 ` David Miller
2014-10-16  6:45                   ` Daniel Borkmann
2014-10-16  7:07                     ` Thomas Graf
2014-12-16 22:58                       ` David Miller
2014-12-16 23:58                         ` Daniel Borkmann
2014-12-17 16:27                           ` Thomas Graf
2014-12-18 17:36                             ` David Miller
2014-12-17  0:02                         ` Eric Dumazet
2014-12-17 16:26                           ` Thomas Graf
2014-12-18 10:30                           ` [PATCH net] netlink: Don't reorder loads/stores before marking mmap netlink frame as available Thomas Graf
2014-12-18 17:36                             ` David Miller
2014-12-18 19:13                             ` Linus Torvalds
2014-10-15 23:45               ` Netlink mmap tx security? Daniel Borkmann
2014-10-15 23:57                 ` David Miller
2014-10-15 23:58                   ` Andy Lutomirski
2014-10-16  3:34                     ` David Miller
2014-10-16  5:52                   ` Thomas Graf

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=CALCETrWDSG2EhxBnM8Jm55Ov8PYQ_w3Wf88SKYOB1q1WgRpbEw@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).