[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250713084309.3912-1-hdanton@sina.com>
Date: Sun, 13 Jul 2025 16:43:08 +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/ipv4/ip_sockglue.c
+++ y/net/ipv4/ip_sockglue.c
@@ -1087,6 +1087,8 @@ int do_ip_setsockopt(struct sock *sk, in
err = ip_options_get(sock_net(sk), &opt, optval, optlen);
if (err)
break;
+ sockopt_release_sock(sk);
+ bh_lock_sock(sk);
old = rcu_dereference_protected(inet->inet_opt,
lockdep_sock_is_held(sk));
if (inet_test_bit(IS_ICSK, sk)) {
@@ -1109,6 +1111,8 @@ int do_ip_setsockopt(struct sock *sk, in
rcu_assign_pointer(inet->inet_opt, opt);
if (old)
kfree_rcu(old, rcu);
+ bh_unlock_sock(sk);
+ sockopt_lock_sock(sk);
break;
}
case IP_CHECKSUM:
--- x/net/netlabel/netlabel_kapi.c
+++ y/net/netlabel/netlabel_kapi.c
@@ -1149,9 +1149,11 @@ int netlbl_conn_setattr(struct sock *sk,
}
switch (entry->type) {
case NETLBL_NLTYPE_CIPSOV4:
+ bh_lock_sock(sk);
ret_val = cipso_v4_sock_setattr(sk,
entry->cipso, secattr,
netlbl_sk_lock_check(sk));
+ bh_unlock_sock(sk);
break;
case NETLBL_NLTYPE_UNLABELED:
/* just delete the protocols we support for right now
--
Powered by blists - more mailing lists