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: <CALDO+SbOmOkKjfE=CNOc-SjBdbFfD26uit9Me7UXWQj+kyiaKw@mail.gmail.com>
Date:   Thu, 17 Aug 2017 15:34:30 -0700
From:   William Tu <u9012063@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Meenakshi Vohra <mvohra@...are.com>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCHv2 net-next] gre: introduce native tunnel support for ERSPAN

>>
>> +static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
>> +                   int gre_hdr_len)
>> +{
>> +     struct net *net = dev_net(skb->dev);
>> +     struct ip_tunnel_net *itn;
>> +     struct ip_tunnel *tunnel;
>> +     struct metadata_dst *tun_dst = NULL;
>> +     const struct iphdr *iph;
>> +     struct erspanhdr *ershdr;
>> +     __be32 index;
>> +     __be32 session_id;
>> +
>> +     itn = net_generic(net, erspan_net_id);
>> +     iph = ip_hdr(skb);
>> +     ershdr = (struct erspanhdr *)(skb->data + gre_hdr_len);
>
> You're not guaranteed the this ershdr area is pulled linearly in the
> SKB.  Only the GRE header and it's options have that guarantee.
>
> So you'll need to add appropriate pskb_may_pull() checks here then
> reaload all of the packet pointers (including 'iph') afterwards.

Thanks, I will make the change and resubmit.
Regards,
William

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ