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: <20160712135109.GB19495@octofox.metropolis>
Date:	Tue, 12 Jul 2016 16:51:10 +0300
From:	Max Filippov <jcmvbkbc@...il.com>
To:	Florian Fainelli <f.fainelli@...il.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	colin.king@...onical.com, tklauser@...tanz.ch,
	thierry.reding@...il.com
Subject: Re: [PATCH net v2 0/2] net: ethoc: Error path and transmit fixes

Hello,

On Mon, Jul 11, 2016 at 04:35:53PM -0700, Florian Fainelli wrote:
> This patch series contains two patches for the ethoc driver while testing on a
> TS-7300 board where ethoc is provided by an on-board FPGA.
> 
> First patch was cooked after chasing crashes with invalid resources passed to
> the driver.
> 
> Second patch was cooked after seeing that an interface configured with IP
> 192.168.2.2 was sending ARP packets for 192.168.0.0, no wonder why it could not
> work.

I can see opencores intrerface sending ARP packets shorter than 64 bytes,
but I couldn't reproduce truncation that affects packet contents on my
hardware.

> I don't have access to any other platform using an ethoc interface so
> it could be good to some testing on Xtensa for instance.

I've tested success and error paths affected by this series with the
following additional change on top of it:

diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index ca678d4..8c94f45 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -862,7 +862,7 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (skb_put_padto(skb, ETHOC_ZLEN)) {
 		dev->stats.tx_errors++;
-		goto out;
+		return NETDEV_TX_OK;
 	}
 
 	if (unlikely(skb->len > ETHOC_BUFSIZ)) {

Without it the interface becomes non-functional after the first error
in skb_put_padto.

Tested-by: Max Filippov <jcmvbkbc@...il.com>
Reviewed-by: Max Filippov <jcmvbkbc@...il.com>

-- 
Thanks.
-- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ