# \[PATCH net 0/2\] Fix use-after-free in metadata dst teardown in airoha\_eth and mtk\_eth\_soc drivers

- From: Lorenzo Bianconi \<lorenzo@kernel.org\>
- Date: 2026-06-02 09:21:36 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/06/17076986
- Thread: https://ratatoskr.run/linux-arm-kernel/2026/06/17076986/t.md

```text
airoha_metadata_dst_free() and mtk_free_dev() call metadata_dst_free()
which frees the metadata_dst with kfree() immediately, bypassing the RCU
grace period.
Replace metadata_dst_free() with dst_release() which properly goes
through the refcount path and runs call_rcu_hurry() if refcount goes to
zero.

---
Lorenzo Bianconi (2):
      net: airoha: Fix use-after-free in metadata dst teardown
      net: ethernet: mtk_eth_soc: Fix use-after-free in metadata dst teardown

 drivers/net/ethernet/airoha/airoha_eth.c    | 2 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 3522b21fd7e1863d0734537737bd59f1b90d0190
change-id: 20260602-airoha-mtk-metadata-uaf-fix-eb03badb1a94

Best regards,
-- 
Lorenzo Bianconi [ref]

```
