lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALx6S37aCze6YvCAA18DR8TTkaO-fCtdVeof7Naa9yh+HJZG+A@mail.gmail.com>
Date:   Tue, 20 Sep 2016 10:19:16 -0700
From:   Tom Herbert <tom@...bertland.com>
To:     Jiri Benc <jbenc@...hat.com>
Cc:     Sowmini Varadhan <sowmini.varadhan@...cle.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Alexander Duyck <aduyck@...antis.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] net/vxlan: Avoid unaligned access in vxlan_build_skb()

On Tue, Sep 20, 2016 at 10:09 AM, Jiri Benc <jbenc@...hat.com> wrote:
> On Tue, 20 Sep 2016 18:43:33 +0200, Jiri Benc wrote:
>> On Tue, 20 Sep 2016 12:31:08 -0400, Sowmini Varadhan wrote:
>> > The vxlan header is after the ethernet header (14 bytes),
>> > IP header (20 bytes, assuming no options) and udp header (8 bytes).
>>
>> If the VXLAN header is not aligned to 4 bytes, then IP header is not
>> aligned to 4 bytes, too, and you have greater problems than just VXLAN.
>
> ...which is indeed the case. Sorry, I guess I'm too much focused on
> VXLAN-GPE nowadays and I missed that we're building this before the
> inner Ethernet header.
>
> But the point stands, we have much greater problems here than VXLAN.
> And I don't think that wrapping all IP address accesses into
> get/put_unaligned all around the stack is the solution.
>
RIght, this is problem with the encapsulations themselves. IP
protocols are supposed to be four-byte aligned and Ethernet
encapsulation is obviously breaking that. We can't address this in
existing standards like GRE-TEB, but for new encapsulations we should
make sure this avoided. I've posted on nvo3 list about this issue.

Tom

>  Jiri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ