From: Weilong Chen <chenweilong@huawei.com>
To: <jeffrey.t.kirsher@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf
Date: Thu, 15 Dec 2016 19:40:34 +0800 [thread overview]
Message-ID: <1481802034-77729-1-git-send-email-chenweilong@huawei.com> (raw)
Nessus report the vf appears to leak memory in network packets.
Fix this by padding all small packets manually.
And the CVE-2003-0001.
https://ofirarkin.files.wordpress.com/2008/11/atstake_etherleak_report.pdf
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 6d4bef5..137a154 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3654,6 +3654,13 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_OK;
}
+ /* On PCI/PCI-X HW, if packet size is less than ETH_ZLEN,
+ * packets may get corrupted during padding by HW.
+ * To WA this issue, pad all small packets manually.
+ */
+ if (eth_skb_pad(skb))
+ return NETDEV_TX_OK;
+
tx_ring = adapter->tx_ring[skb->queue_mapping];
/* need: 1 descriptor per page * PAGE_SIZE/IXGBE_MAX_DATA_PER_TXD,
--
1.7.12
next reply other threads:[~2016-12-15 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 11:40 Weilong Chen [this message]
2016-12-15 16:13 ` [PATCH net-next] ixgbevf: fix 'Etherleak' in ixgbevf Alexander Duyck
2016-12-20 11:50 ` Weilong Chen
2016-12-20 16:36 ` Alexander Duyck
2016-12-21 1:40 ` Weilong Chen
2016-12-21 2:20 ` Alexander Duyck
2016-12-22 2:00 ` Kefeng Wang
2016-12-22 17:55 ` Alexander Duyck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481802034-77729-1-git-send-email-chenweilong@huawei.com \
--to=chenweilong@huawei.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).