Patch "calipso: unlock rcu before returning -EAFNOSUPPORT" has been added to the 5.4-stable tree

1 view
Skip to first unread message

gre...@linuxfoundation.org

unread,
Jun 17, 2025, 11:12:23 AM6/17/25
to edum...@google.com, gre...@linuxfoundation.org, ku...@kernel.org, kun...@amazon.com, pa...@paul-moore.com, syzk...@googlegroups.com, stable-...@vger.kernel.org

This is a note to let you know that I've just added the patch titled

calipso: unlock rcu before returning -EAFNOSUPPORT

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
calipso-unlock-rcu-before-returning-eafnosupport.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@vger.kernel.org> know about it.


From 3cae906e1a6184cdc9e4d260e4dbdf9a118d94ad Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edum...@google.com>
Date: Wed, 4 Jun 2025 13:38:26 +0000
Subject: calipso: unlock rcu before returning -EAFNOSUPPORT

From: Eric Dumazet <edum...@google.com>

commit 3cae906e1a6184cdc9e4d260e4dbdf9a118d94ad upstream.

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 <syzk...@googlegroups.com>
Signed-off-by: Eric Dumazet <edum...@google.com>
Cc: Kuniyuki Iwashima <kun...@amazon.com>
Acked-by: Paul Moore <pa...@paul-moore.com>
Link: https://patch.msgid.link/20250604133826.1...@google.com
Signed-off-by: Jakub Kicinski <ku...@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
net/netlabel/netlabel_kapi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -1140,8 +1140,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,


Patches currently in stable-queue which might be from edum...@google.com are

queue-5.4/net_sched-tbf-fix-a-race-in-tbf_change.patch
queue-5.4/calipso-unlock-rcu-before-returning-eafnosupport.patch
queue-5.4/net_sched-prio-fix-a-race-in-prio_tune.patch
queue-5.4/net_sched-sch_sfq-fix-a-potential-crash-on-gso_skb-h.patch
queue-5.4/net_sched-red-fix-a-race-in-__red_change.patch
Reply all
Reply to author
Forward
0 new messages