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: <CALx6S37=BFPfFB5Jwug5VeNJG2qtmVsRxCq-sW=q1knz73ZwhA@mail.gmail.com>
Date:	Wed, 16 Mar 2016 10:09:38 -0700
From:	Tom Herbert <tom@...bertland.com>
To:	Jiri Benc <jbenc@...hat.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] vxlan: fix too large pskb_may_pull with remote checksum

On Wed, Mar 16, 2016 at 9:35 AM, Jiri Benc <jbenc@...hat.com> wrote:
> The vxlan header is pulled at this point, don't include it again in the
> calculation.
>
Hmm, I think I missing something obvious. Where was the pull of the
vxlan header done?

Thanks,
Tom

> Signed-off-by: Jiri Benc <jbenc@...hat.com>
> ---
> This was previously part of the VXLAN-GPE patchset but it's not really
> related (especially not after the discussion that RCO should not be allowed
> together with GPE). I'm sending it separately.
> ---
>  drivers/net/vxlan.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 800106a7246c..1eb8347f440c 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1143,7 +1143,7 @@ static int vxlan_igmp_leave(struct vxlan_dev *vxlan)
>  static bool vxlan_remcsum(struct vxlanhdr *unparsed,
>                           struct sk_buff *skb, u32 vxflags)
>  {
> -       size_t start, offset, plen;
> +       size_t start, offset;
>
>         if (!(unparsed->vx_flags & VXLAN_HF_RCO) || skb->remcsum_offload)
>                 goto out;
> @@ -1151,9 +1151,7 @@ static bool vxlan_remcsum(struct vxlanhdr *unparsed,
>         start = vxlan_rco_start(unparsed->vx_vni);
>         offset = start + vxlan_rco_offset(unparsed->vx_vni);
>
> -       plen = sizeof(struct vxlanhdr) + offset + sizeof(u16);
> -
> -       if (!pskb_may_pull(skb, plen))
> +       if (!pskb_may_pull(skb, offset + sizeof(u16)))
>                 return false;
>
>         skb_remcsum_process(skb, (void *)(vxlan_hdr(skb) + 1), start, offset,
> --
> 1.8.3.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ