All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net: openvswitch: datapath: fix data type in queue_gso_packets" has been added to the 4.14-stable tree
@ 2017-12-14 10:47 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-14 10:47 UTC (permalink / raw)
  To: garsilva, davem, gregkh, willemb; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net: openvswitch: datapath: fix data type in queue_gso_packets

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-openvswitch-datapath-fix-data-type-in-queue_gso_packets.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Dec 14 11:45:40 CET 2017
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Sat, 25 Nov 2017 13:14:40 -0600
Subject: net: openvswitch: datapath: fix data type in queue_gso_packets

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>


[ Upstream commit 2734166e89639c973c6e125ac8bcfc2d9db72b70 ]

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@embeddedor.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/openvswitch/datapath.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -335,7 +335,7 @@ static int queue_gso_packets(struct data
 			     const struct dp_upcall_info *upcall_info,
 				 uint32_t cutlen)
 {
-	unsigned short gso_type = skb_shinfo(skb)->gso_type;
+	unsigned int gso_type = skb_shinfo(skb)->gso_type;
 	struct sw_flow_key later_key;
 	struct sk_buff *segs, *nskb;
 	int err;


Patches currently in stable-queue which might be from garsilva@embeddedor.com are

queue-4.14/net-openvswitch-datapath-fix-data-type-in-queue_gso_packets.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-14 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 10:47 Patch "net: openvswitch: datapath: fix data type in queue_gso_packets" has been added to the 4.14-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.