From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from r3-22.sinamail.sina.com.cn (r3-22.sinamail.sina.com.cn [202.108.3.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DA26944F for ; Fri, 11 Jul 2025 06:11:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752214325; cv=none; b=CD6DzCssZshRiCkYP95JabtEeyVLa50o+N/UXICY2D+OfSJKGCT+wzBjP/xRYFc3T25BzdW60iPWPH0BT6GBuAeHiRaIted85DNw9z8k2G/z/AvGcHps1KL8gQGslBsY3QbOrwT2tNfN3+Bpl4CCb6runK12QR5GoZgQoVZOZVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752214325; c=relaxed/simple; bh=cauHnPV1F2TEV1cB3oL211Ehy7VwBXAjO04HXibOA5M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Sj7O4rR2vDNcu66hZpg9Z1Y9xn8F8CVO/aRhwe3qA1wkgK7b8UjsF2Xl3ryRYsgEtCl/U2byvTh0xIN1Y9NwYN6ehKgHYW+eYJpXBOiWAFLM+CeeQtbtCc5L7562I7fHd9HCHqkETG0fhEeH7SxURBAma7X3F2rWtHqEZXYseGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=PwNmVTE9; arc=none smtp.client-ip=202.108.3.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="PwNmVTE9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1752214320; bh=vgsM/uAE7S7vGyAx1tHmf5yQrhOM0rQBf3nNoAAkiMs=; h=From:Subject:Date:Message-ID; b=PwNmVTE9Tv9XgIKXnXwoQIsLHC1+4GqtcXxXo8SXqaaML0OgMIm/uz1OdotXSnA6V SqpoGiQyar2S+xwa3tl2DCg/sFJU5mvQffb5mzhv0sXZ+CRum/VBw2E1c8C9S/9Km4 FAnhkD5fob81sPEjsu7ZkiCFpSz/GPLo5bMogbEs= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.58.236]) by sina.com (10.54.253.33) with ESMTP id 6870AB2B0000223F; Fri, 11 Jul 2025 14:11:57 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 5184246685183 X-SMAIL-UIID: 3DDEEA9E8441489294A32A9706BA9096-20250711-141157-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [lsm?] [net?] WARNING in kvfree_call_rcu Date: Fri, 11 Jul 2025 14:11:45 +0800 Message-ID: <20250711061146.3438-1-hdanton@sina.com> In-Reply-To: <686d9b50.050a0220.1ffab7.0020.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > 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/cipso_ipv4.c +++ y/net/ipv4/cipso_ipv4.c @@ -1848,6 +1848,7 @@ static int cipso_v4_get_actual_opt_len(c * values on failure. * */ +static DEFINE_SPINLOCK(setattr_spinlock); int cipso_v4_sock_setattr(struct sock *sk, const struct cipso_v4_doi *doi_def, const struct netlbl_lsm_secattr *secattr, @@ -1899,6 +1900,7 @@ int cipso_v4_sock_setattr(struct sock *s kfree(buf); buf = NULL; + spin_lock(&setattr_spinlock); sk_inet = inet_sk(sk); old = rcu_dereference_protected(sk_inet->inet_opt, sk_locked); @@ -1912,6 +1914,7 @@ int cipso_v4_sock_setattr(struct sock *s rcu_assign_pointer(sk_inet->inet_opt, opt); if (old) kfree_rcu(old, rcu); + spin_unlock(&setattr_spinlock); return 0; --