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: <55E40A4D-8CE1-4433-9BB0-43CB41021BA1@intel.com>
Date:	Tue, 29 Sep 2015 22:48:56 +0000
From:	"Rustad, Mark D" <mark.d.rustad@...el.com>
To:	Joe Stringer <joestringer@...ira.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"pshelar@...ira.com" <pshelar@...ira.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 3/7] openvswitch: Fix skb leak in ovs_fragment()

> On Sep 29, 2015, at 3:39 PM, Joe Stringer <joestringer@...ira.com> wrote:
> 
> @@ -728,8 +727,14 @@ 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 out;
> 	}
> +
> +	skb = NULL;
> +
> +out:
> +	if (skb)
> +		kfree_skb(skb);
> }
> 
> static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,

Wouldn't that hunk be better as:

@@ -728,8 +727,13 @@ 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 out;
	}
+
+	return;
+
+out:
+	kfree_skb(skb);
}

static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,

--
Mark Rustad, Networking Division, Intel Corporation


Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ