eth: fbnic: unlink NAPIs from queues on error to open
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 eth: fbnic: unlink NAPIs from queues on error to open
CI hit a UaF in fbnic in the AF_XDP portion of the queues.py test. The UaF is in the __sk_mark_napi_id_once() call in xsk_bind(), NAPI has been freed. Looks like the device failed to open earlier, and we lack clearing the NAPI pointer from the queue.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c +3 -1
@@ -33,7 +33,7 @@ int __fbnic_open(struct fbnic_net *fbn)dev_warn (fbd->dev,"Error %d sending host ownership message to the firmware\n" , err); - goto free_resources; + goto err_reset_queues; } err =fbnic_time_start (fbn);
@@ -57,6 +57,8 @@ int __fbnic_open(struct fbnic_net *fbn)fbnic_time_stop (fbn); release_ownership:fbnic_fw_xmit_ownership_msg (fbn->fbd, false); +err_reset_queues: +fbnic_reset_netif_queues (fbn); free_resources:fbnic_free_resources (fbn); free_napi_vectors:
Signature · 1 line
2.50.1
Quoted 8 lines · Jakub Kicinski
CI hit a UaF in fbnic in the
AF_XDPportion of thequeues.pytest. The UaF is in the__sk_mark_napi_id_once()call inxsk_bind(), NAPI has been freed. Looks like the device failed to open earlier, and we lack clearing the NAPI pointer from the queue.Fixes 557d02238e05 ("eth: fbnic: centralize the queue count and NAPI<>queue setting")Reviewed-by Alexander Duyck <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>
Thanks,
I agree that the cited commit should have updated the unwind path as per this patch.
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 28 Jul 2025 09:31:29 -0700 you wrote:
CI hit a UaF in fbnic in the
AF_XDPportion of thequeues.pytest. The UaF is in the__sk_mark_napi_id_once()call inxsk_bind(), NAPI has been freed. Looks like the device failed to open earlier, and we lack clearing the NAPI pointer from the queue.Fixes 557d02238e05 ("eth: fbnic: centralize the queue count and NAPI<>queue setting")Reviewed-by Alexander Duyck <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>[...]
Here is the summary with links:
- [net] eth: fbnic: unlink NAPIs from queues on error to open
https://git.kernel.org/netdev/net/c/4b31bcb025cb
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html