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]
Message-ID: <Y3u+84hDCgoehzj1@boxer>
Date:   Mon, 21 Nov 2022 19:09:55 +0100
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     Yuan Can <yuancan@...wei.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
        "error27@...il.com" <error27@...il.com>,
        "bigeasy@...utronix.de" <bigeasy@...utronix.de>,
        "colin.i.king@...il.com" <colin.i.king@...il.com>,
        "yang.lee@...ux.alibaba.com" <yang.lee@...ux.alibaba.com>,
        "josright123@...il.com" <josright123@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: dm9051: Fix missing dev_kfree_skb() in
 dm9051_loop_rx()

On Mon, Nov 21, 2022 at 04:32:26AM +0100, Yuan Can wrote:
> The dm9051_loop_rx() returns without release skb when dm9051_stop_mrcmd()
> returns error, free the skb to avoid this leak.
> 
> Fixes: 2dc95a4d30ed ("net: Add dm9051 driver")
> Signed-off-by: Yuan Can <yuancan@...wei.com>
> ---
>  drivers/net/ethernet/davicom/dm9051.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

> 
> diff --git a/drivers/net/ethernet/davicom/dm9051.c b/drivers/net/ethernet/davicom/dm9051.c
> index a523ddda7609..de7105a84747 100644
> --- a/drivers/net/ethernet/davicom/dm9051.c
> +++ b/drivers/net/ethernet/davicom/dm9051.c
> @@ -798,8 +798,10 @@ static int dm9051_loop_rx(struct board_info *db)
>  		}
>  
>  		ret = dm9051_stop_mrcmd(db);
> -		if (ret)
> +		if (ret) {
> +			dev_kfree_skb(skb);
>  			return ret;
> +		}
>  
>  		skb->protocol = eth_type_trans(skb, db->ndev);
>  		if (db->ndev->features & NETIF_F_RXCSUM)
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ