Re: [PATCH net v3] net/smc: protect clcsock lifetime in smc_getname

From: patchwork-bot+netdevbpf

Date: Thu Oct 08 2026 - 14:53:54 EST


Hello:

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

On Thu, 8 Oct 2026 16:44:44 +0800 you wrote:
> smc_getname() dereferences smc->clcsock without holding
> clcsock_release_lock. Link-group termination can release the CLC socket
> through smc_close_active_abort() while the SMC socket is still open,
> for example after shutdown(SHUT_WR).
>
> A getsockname() caller can load smc->clcsock, then the termination worker
> can clear the pointer and call sock_release() before the caller accesses
> clcsock->ops or invokes getname(). This causes a use-after-free; if the
> worker clears the pointer before the load, it causes a NULL dereference.
> The syscall's file reference keeps the SMC socket alive but does not
> prevent asynchronous release of its CLC socket.
>
> [...]

Here is the summary with links:
- [net,v3] net/smc: protect clcsock lifetime in smc_getname
https://git.kernel.org/netdev/net/c/64a6b36b0e18

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