netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: willemdebruijn.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
	steffen.klassert-opNxpl+3fjRBDgjK7y7TUQ@public.gmane.org,
	willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org,
	garsilva-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org
Subject: Re: [PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets
Date: Mon, 27 Nov 2017 02:16:20 +0900 (KST)	[thread overview]
Message-ID: <20171127.021620.1571330749332933346.davem@davemloft.net> (raw)
In-Reply-To: <CAF=yD-J-E8vWgDYPJCpG45DYi81-nFTz-EOcWZwH-tLpS2o3rw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

From: Willem de Bruijn <willemdebruijn.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Sat, 25 Nov 2017 16:15:01 -0500

> On Sat, Nov 25, 2017 at 2:14 PM, Gustavo A. R. Silva
> <garsilva-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org> wrote:
>> gso_type is being used in binary AND operations together with SKB_GSO_UDP.
>> The issue is that variable gso_type is of type unsigned short and
>> SKB_GSO_UDP expands to more than 16 bits:
>>
>> SKB_GSO_UDP = 1 << 16
>>
>> this makes any binary AND operation between gso_type and SKB_GSO_UDP to
>> be always zero, hence making some code unreachable and likely causing
>> undesired behavior.
>>
>> Fix this by changing the data type of variable gso_type to unsigned int.
>>
>> Addresses-Coverity-ID: 1462223
>> Fixes: 0c19f846d582 ("net: accept UFO datagrams from tuntap and packet")
>> Signed-off-by: Gustavo A. R. Silva <garsilva-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>
> 
> Acked-by: Willem de Bruijn <willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

Applied and I'll queued this up with Willem's changes for -stable.

Thanks!

  parent reply	other threads:[~2017-11-26 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-25 19:14 [PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets Gustavo A. R. Silva
     [not found] ` <20171125191440.GA30194-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>
2017-11-25 21:15   ` Willem de Bruijn
     [not found]     ` <CAF=yD-J-E8vWgDYPJCpG45DYi81-nFTz-EOcWZwH-tLpS2o3rw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-26 17:16       ` David Miller [this message]
2017-11-27 14:40         ` Gustavo A. R. Silva

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=20171127.021620.1571330749332933346.davem@davemloft.net \
    --to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
    --cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
    --cc=garsilva-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org \
    --cc=steffen.klassert-opNxpl+3fjRBDgjK7y7TUQ@public.gmane.org \
    --cc=willemb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=willemdebruijn.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).