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] [day] [month] [year] [list]
Date:	Tue, 12 Jul 2016 10:35:07 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jcmvbkbc@...il.com
Cc:	f.fainelli@...il.com, netdev@...r.kernel.org,
	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

From: Max Filippov <jcmvbkbc@...il.com>
Date: Tue, 12 Jul 2016 16:51:10 +0300

> 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>

Indeed, skb_put_padto() frees the skb on error so this would have caused
a double free.

Florian, please respin this series with the fix and tags added.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ