Home Home > GIT Browse > SLE15-SP1-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2017-12-08 22:45:32 +0100
committerMichal Kubecek <mkubecek@suse.cz>2017-12-08 22:45:35 +0100
commit6e1c320dc6e366134bb150dae7dca498811b6f36 (patch)
tree1b901e9df0b5a42eec2cf46c235d43db3a46573a
parentb5c6a3b3fb5bf6e4301caa0bd1013a81c802ef92 (diff)
net: openvswitch: datapath: fix data type in queue_gso_packets
(bsc#1066757).
-rw-r--r--patches.fixes/net-openvswitch-datapath-fix-data-type-in-queue_gso_.patch46
-rw-r--r--series.conf1
2 files changed, 47 insertions, 0 deletions
diff --git a/patches.fixes/net-openvswitch-datapath-fix-data-type-in-queue_gso_.patch b/patches.fixes/net-openvswitch-datapath-fix-data-type-in-queue_gso_.patch
new file mode 100644
index 0000000000..6471dc3e23
--- /dev/null
+++ b/patches.fixes/net-openvswitch-datapath-fix-data-type-in-queue_gso_.patch
@@ -0,0 +1,46 @@
+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
+Patch-mainline: v4.15-rc2
+Git-commit: 2734166e89639c973c6e125ac8bcfc2d9db72b70
+References: bsc#1066757
+
+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>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ net/openvswitch/datapath.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
+index 3c06600612b8..b26f37ef234b 100644
+--- a/net/openvswitch/datapath.c
++++ b/net/openvswitch/datapath.c
+@@ -335,7 +335,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
+ 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;
+--
+2.15.1
+
diff --git a/series.conf b/series.conf
index 8fc82f8ac1..4ed0dccdda 100644
--- a/series.conf
+++ b/series.conf
@@ -5890,6 +5890,7 @@
patches.drivers/0001-iwlwifi-mvm-support-version-7-of-the-SCAN_REQ_UMAC-F.patch
patches.fixes/target-move-a-declaration-of-a-global-variable-into-a-header-file
patches.drivers/net-thunderx-Fix-TCP-UDP-checksum-offload-for-IPv6-p.patch
+ patches.fixes/net-openvswitch-datapath-fix-data-type-in-queue_gso_.patch
patches.fixes/mm-hugetlbfs-introduce-split-to-vm_operations_struct.patch
patches.fixes/device-dax-implement-split-to-catch-invalid-munmap-a.patch
patches.fixes/mm-introduce-get_user_pages_longterm.patch