[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250712235411.3747-1-hdanton@sina.com>
Date: Sun, 13 Jul 2025 07:54:10 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+40bf00346c3fe40f90f2@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [lsm?] [net?] WARNING in kvfree_call_rcu
> Date: Tue, 08 Jul 2025 15:27:28 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 7482bb149b9f Merge branch 'for-next/core' into for-kernelci
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
> console output: https://syzkaller.appspot.com/x/log.txt?x=130c528c580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=3c06e3e2454512b3
> dashboard link: https://syzkaller.appspot.com/bug?extid=40bf00346c3fe40f90f2
> userspace arch: arm64
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1257428c580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15fe9582580000
#syz test
--- x/net/netlabel/netlabel_kapi.c
+++ y/net/netlabel/netlabel_kapi.c
@@ -984,6 +984,7 @@ int netlbl_sock_setattr(struct sock *sk,
int ret_val;
struct netlbl_dom_map *dom_entry;
+ sockopt_lock_sock(sk);
rcu_read_lock();
dom_entry = netlbl_domhsh_getentry(secattr->domain, family);
if (dom_entry == NULL) {
@@ -1033,6 +1034,7 @@ int netlbl_sock_setattr(struct sock *sk,
socket_setattr_return:
rcu_read_unlock();
+ sockopt_release_sock(sk);
return ret_val;
}
@@ -1047,6 +1049,7 @@ socket_setattr_return:
*/
void netlbl_sock_delattr(struct sock *sk)
{
+ sockopt_lock_sock(sk);
switch (sk->sk_family) {
case AF_INET:
cipso_v4_sock_delattr(sk);
@@ -1057,6 +1060,7 @@ void netlbl_sock_delattr(struct sock *sk
break;
#endif /* IPv6 */
}
+ sockopt_release_sock(sk);
}
/**
@@ -1137,6 +1141,7 @@ int netlbl_conn_setattr(struct sock *sk,
#endif
struct netlbl_dommap_def *entry;
+ sockopt_lock_sock(sk);
rcu_read_lock();
switch (addr->sa_family) {
case AF_INET:
@@ -1199,6 +1204,7 @@ int netlbl_conn_setattr(struct sock *sk,
conn_setattr_return:
rcu_read_unlock();
+ sockopt_release_sock(sk);
return ret_val;
}
--
Powered by blists - more mailing lists