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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Nov 2015 19:34:24 -0800
From:	Iyappan Subramanian <isubramanian@....com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Mark Rutland <mark.rutland@....com>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Keyur Chudgar <kchudgar@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	ryabinin.a.a@...il.com,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH net] drivers: net: xgene: fix possible use after free

On Wed, Nov 25, 2015 at 9:02 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Once TX has been enabled on a NIC, it is illegal to access skb,
> as this skb might have been freed by another cpu, from TX completion
> handler.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Mark Rutland <mark.rutland@....com>
> Tested-by: Mark Rutland <mark.rutland@....com>
> Cc: Iyappan Subramanian <isubramanian@....com>
> ---
>  drivers/net/ethernet/apm/xgene/xgene_enet_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> index 1adfe7036843..9147a0107c44 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> @@ -450,12 +450,12 @@ static netdev_tx_t xgene_enet_start_xmit(struct sk_buff *skb,
>                 return NETDEV_TX_OK;
>         }
>
> -       pdata->ring_ops->wr_cmd(tx_ring, count);
>         skb_tx_timestamp(skb);
>
>         pdata->stats.tx_packets++;
>         pdata->stats.tx_bytes += skb->len;
>
> +       pdata->ring_ops->wr_cmd(tx_ring, count);

Thanks Mark and Eric, for the fix.

Acked-by: Iyappan Subramanian <isubramanian@....com>

>         return NETDEV_TX_OK;
>  }
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists