Thread (3 messages) flat view 3 messages, 3 authors, 2021-11-13

Re: [PATCH v1] hamradio: remove needs_free_netdev to avoid UAF

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-11-13 04:20:27
Also in: lkml

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski [off-list ref]:

On Thu, 11 Nov 2021 22:14:02 +0800 you wrote:
The former patch "defer 6pack kfree after unregister_netdev" reorders
the kfree of two buffer after the unregister_netdev to prevent the race
condition. It also adds free_netdev() function in sixpack_close(), which
is a direct copy from the similar code in mkiss_close().

However, in sixpack driver, the flag needs_free_netdev is set to true in
sp_setup(), hence the unregister_netdev() will free the netdev
automatically. Therefore, as the sp is netdev_priv, use-after-free
occurs.

[...]
Here is the summary with links:
  - [v1] hamradio: remove needs_free_netdev to avoid UAF
    https://git.kernel.org/netdev/net/c/81b1d548d00b

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help