🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Guangshuo Li Thu, 12 Nov 2026 13:59
[PATCH net] bnx2x: Fix potential IRO array leak on removal
#15245
Author: Guangshuo Li
Date: Thu, 12 Nov 2026 13:59
29 lines
9213 bytes
Firmware initialization allocates a separate IRO array, but
bnx2x_release_firmware() only frees the other parsed tables. Removing
the device loses the array pointer with the netdev.

Free the IRO array with the remaining firmware tables.

This issue was found by our static analysis tool under development.

Fixes: 523224a3b3cd ("bnx2x, cnic, bnx2i: use new FW/HSI")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 277c7bd9c6e7..c6afde9466be 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -13489,6 +13489,7 @@ static int bnx2x_init_firmware(struct bnx2x *bp)
 
 static void bnx2x_release_firmware(struct bnx2x *bp)
 {
+	kfree(bp->iro_arr);
 	kfree(bp->init_ops_offsets);
 	kfree(bp->init_ops);
 	kfree(bp->init_data);

base-commit: 2e54b3e187300893688c2c7517894f5d96732e05
Re: [PATCH net] bnx2x: Fix potential IRO array leak on removal
#18218
Author: patchwork-bot+netdevbpf
Date: Wed, 18 Nov 2026 01:30
25 lines
8590 bytes
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 12 Nov 2026 21:59:10 +0800 you wrote:
> Firmware initialization allocates a separate IRO array, but
> bnx2x_release_firmware() only frees the other parsed tables. Removing
> the device loses the array pointer with the netdev.
> 
> Free the IRO array with the remaining firmware tables.
> 
> This issue was found by our static analysis tool under development.
> 
> [...]

Here is the summary with links:
  - [net] bnx2x: Fix potential IRO array leak on removal
    https://git.kernel.org/netdev/net-next/c/155ee7139278

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads