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-next>] [day] [month] [year] [list]
Message-ID: <20151117142427.37a4cc36@samsung9>
Date:	Tue, 17 Nov 2015 14:24:27 -0800
From:	Stephen Hemminger <shemming@...cade.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC:	<netdev@...r.kernel.org>
Subject: [PATCH] fm10k: fix memory leak

This was detected by Coverity.
The function skb_cow_head leaves skb alone on failure, so caller needs
to free.

Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>

--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c	2015-11-17 13:33:40.032694657 -0800
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c	2015-11-17 14:13:03.086942495 -0800
@@ -627,8 +627,10 @@ static netdev_tx_t fm10k_xmit_frame(stru
 
 		/* verify the skb head is not shared */
 		err = skb_cow_head(skb, 0);
-		if (err)
+		if (err) {
+			dev_kfree_skb(skb);
 			return NETDEV_TX_OK;
+		}
 
 		/* locate vlan header */
 		vhdr = (struct vlan_hdr *)(skb->data + ETH_HLEN);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ