calipso: unlock rcu before returning -EAFNOSUPPORT
Subsystems (4)
PATCH 1/1 calipso: unlock rcu before returning -EAFNOSUPPORT
syzbot reported that a recent patch forgot to unlock rcu in the error path.
Adopt the convention that netlbl_conn_setattr() is already using.
--- net/netlabel/netlabel_kapi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/netlabel/netlabel_kapi.c +4 -2
@@ -1165,8 +1165,10 @@ int netlbl_conn_setattr(struct sock *sk,break ;#if IS_ENABLED (CONFIG_IPV6 )case AF_INET6 : -if (sk->sk_family !=AF_INET6 ) -return -EAFNOSUPPORT ; +if (sk->sk_family !=AF_INET6 ) { + ret_val = -EAFNOSUPPORT ; + goto conn_setattr_return; + } addr6 = (struct sockaddr_in6 *)addr; entry = netlbl_domhsh_getentry_af6(secattr->domain,
Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
From: Eric Dumazet <[email protected]>
Date: Wed, 4 Jun 2025 13:38:26 +0000
Quoted 11 lines
syzbot reported that a recent patch forgot to unlock rcu in the error path.
Adopt the convention that
netlbl_conn_setattr()is already using.Fixes 6e9f2df1c550 ("calipso: Don't call calipso functions for AF_INET sk.")Reported-by syzbot <[email protected]>Signed-off-by Eric Dumazet <[email protected]>Cc Kuniyuki Iwashima <[email protected]>Acked-by Paul Moore <[email protected]>
Thanks for cathcing this!
Reviewed-by Kuniyuki Iwashima <[email protected]>
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 5 lines · On Wed, 4 Jun 2025 13:38:26 +0000 you wrote:
syzbot reported that a recent patch forgot to unlock rcu in the error path.
Adopt the convention that
netlbl_conn_setattr()is already using.
Quoted 8 lines
Fixes 6e9f2df1c550 ("calipso: Don't call calipso functions for AF_INET sk.")Reported-by syzbot <[email protected]>Signed-off-by Eric Dumazet <[email protected]>Cc Kuniyuki Iwashima <[email protected]>Acked-by Paul Moore <[email protected]>[...]
Here is the summary with links:
- [net] calipso: unlock rcu before returning -EAFNOSUPPORT
https://git.kernel.org/netdev/net/c/3cae906e1a61
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html