]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge branch 'fix-use-after-free-in-metadata-dst-teardown-in-airoha_eth-and-mtk_eth_s...
authorJakub Kicinski <kuba@kernel.org>
Thu, 4 Jun 2026 02:15:34 +0000 (19:15 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jun 2026 02:15:34 +0000 (19:15 -0700)
Lorenzo Bianconi says:

====================
Fix use-after-free in metadata dst teardown in airoha_eth and mtk_eth_soc drivers

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.
====================

Link: https://patch.msgid.link/20260602-airoha-mtk-metadata-uaf-fix-v1-0-3aaa99d83351@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge