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] [day] [month] [year] [list]
Message-ID: <CAF=yD-Jaw24tdKW7pVqYzdvZburZYuu4+Zzs4FfBYOmLRZ02Gg@mail.gmail.com>
Date:   Thu, 18 Jan 2018 19:23:21 -0500
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     Network Development <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Willem de Bruijn <willemb@...gle.com>,
        Vlad Yasevic <vyasevic@...hat.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH net] gso: validate gso_type if SKB_GSO_DODGY

> Okay, I'm working on a patch that adds explicit checks

Sent: http://patchwork.ozlabs.org/patch/863237/

>
>   @@ -45,6 +45,9 @@ static struct sk_buff *sctp_gso_segment(struct sk_buff *skb,
>           struct sk_buff *segs = ERR_PTR(-EINVAL);
>           struct sctphdr *sh;
>
>   +       if (!skb_shinfo(skb)->gso_type & SKB_GSO_SCTP)
>   +               goto out;
>   +
>
> to all transport layer gso offloads: {sctp, tcpv[46], ufov[46], espv[46]}. This
> will block packets with gso_type X but protocol type Y from being parsed.
> But does allow entering a tunnel protocol handler if that is different from Y,
> unlike the above patch.
>
> tunnels segmentation itself is protected by skb->encapsulation. Only tunnel
> devices in the stack can set this field, not virtio_net_hdr_to_skb. Packets that
> enter {gre, udp tunnel, ipxip4, ipxip6} without this bit are already dropped, so
> no new checks are needed to these based on gso_type.

This is not yet sufficient. If a packet comes from userspace with tunnel
headers and passes through a tunnel that sets skb->encapsulation, it is
indistinguishable from a valid tunneled packet. That bit is not exclusive,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ