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: <CAH-L+nMUhn0n=RmDTi0_5iXAsP=tkr-AbwnYoCnQ+_Q9apW98w@mail.gmail.com>
Date: Wed, 24 Apr 2024 09:35:45 +0530
From: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
To: Su Hui <suhui@...china.com>
Cc: sgoutham@...vell.com, lcherian@...vell.com, gakula@...vell.com, 
	jerinj@...vell.com, hkelam@...vell.com, sbhatta@...vell.com, 
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	nathan@...nel.org, ndesaulniers@...gle.com, morbo@...gle.com, 
	justinstitt@...gle.com, sumang@...vell.com, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] octeontx2-af: fix the double free in rvu_npc_freemem()

On Wed, Apr 24, 2024 at 7:58 AM Su Hui <suhui@...china.com> wrote:
>
> Clang static checker(scan-build) warning:
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c:line 2184, column 2
> Attempt to free released memory.
>
> npc_mcam_rsrcs_deinit() has released 'mcam->counters.bmap'. Deleted this
> redundant kfree() to fix this double free problem.
>
> Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs")
> Signed-off-by: Su Hui <suhui@...china.com>

LGTM
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> index be709f83f331..e8b73b9d75e3 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> @@ -2181,7 +2181,6 @@ void rvu_npc_freemem(struct rvu *rvu)
>
>         kfree(pkind->rsrc.bmap);
>         npc_mcam_rsrcs_deinit(rvu);
> -       kfree(mcam->counters.bmap);
>         if (rvu->kpu_prfl_addr)
>                 iounmap(rvu->kpu_prfl_addr);
>         else
> --
> 2.30.2
>
>


-- 
Regards,
Kalesh A P

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4239 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ