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: <b106c744-112f-4820-8bac-b0949c51801a@huawei.com>
Date: Mon, 9 Feb 2026 15:58:51 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Bo Sun <bo@...xify.com>, <kuba@...nel.org>, <pabeni@...hat.com>
CC: <shaojijie@...wei.com>, <gakula@...vell.com>, <sgoutham@...vell.com>,
	<sbhatta@...vell.com>, <hkelam@...vell.com>, <horms@...nel.org>,
	<bbhushan2@...vell.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <sumang@...vell.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH net v2 1/2] octeontx2-af: CGX: fix bitmap leaks


on 2026/2/6 21:09, Bo Sun wrote:
> The RX/TX flow-control bitmaps (rx_fc_pfvf_bmap and tx_fc_pfvf_bmap)
> are allocated by cgx_lmac_init() but never freed in cgx_lmac_exit().
> Unbinding and rebinding the driver therefore triggers kmemleak:
>
>      unreferenced object (size 16):
>          backtrace:
>            rvu_alloc_bitmap
>            cgx_probe
>
> Free both bitmaps during teardown.
>
> Fixes: e740003874ed ("octeontx2-af: Flow control resource management")
> Cc: stable@...r.kernel.org
> Signed-off-by: Bo Sun <bo@...xify.com>
> ---
>   drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> index 42044cd810b1..fd4792e432bf 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
> @@ -1823,6 +1823,8 @@ static int cgx_lmac_exit(struct cgx *cgx)
>   		cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false);
>   		cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true);
>   		kfree(lmac->mac_to_index_bmap.bmap);
> +		rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap);
> +		rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap);

Reviewed-by: Jijie Shao <shaojijie@...wei.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ