Message ID | 1444083799-57090-3-git-send-email-joestringer@nicira.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
Hello. On 10/6/2015 1:23 AM, Joe Stringer wrote: > If ovs_fragment() was unable to fragment the skb due to an L2 header > that exceeds the supported length, skbs would be leaked. Fix the bug. > > Fixes: 7f8a436 "openvswitch: Add conntrack action" 12-digit SHA1 needed here. And parens along with double quotes as well. > Signed-off-by: Joe Stringer <joestringer@nicira.com> > Acked-by: Pravin B Shelar <pshelar@nicira.com> MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 6 October 2015 at 07:12, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > Hello. > > On 10/6/2015 1:23 AM, Joe Stringer wrote: > >> If ovs_fragment() was unable to fragment the skb due to an L2 header >> that exceeds the supported length, skbs would be leaked. Fix the bug. >> >> Fixes: 7f8a436 "openvswitch: Add conntrack action" > > > 12-digit SHA1 needed here. And parens along with double quotes as well. OK, I sent a fresh series with all of the SHA1s updated. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index e23a61cc3d5c..4cb93f92d6be 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -684,7 +684,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru, { if (skb_network_offset(skb) > MAX_L2_LEN) { OVS_NLERR(1, "L2 header too long to fragment"); - return; + goto err; } if (ethertype == htons(ETH_P_IP)) { @@ -708,8 +708,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru, struct rt6_info ovs_rt; if (!v6ops) { - kfree_skb(skb); - return; + goto err; } prepare_frag(vport, skb); @@ -728,8 +727,12 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru, WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.", ovs_vport_name(vport), ntohs(ethertype), mru, vport->dev->mtu); - kfree_skb(skb); + goto err; } + + return; +err: + kfree_skb(skb); } static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,