From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796412424; b=RZZ1LWByPn+/Sf0jvNSyrSNk5NCljidZO/I7Ds7mOX70xo9tRpDj0fnZCo4ZcOVMaVJk ZInuOMqNFAmcz1wgEy9PHkDg3zBcBS5xNFe+rriavWbPL7+7MrvKFvcxyLFpNIV/EkhhY sB1Wj0plT3mTQoS2jPdySqRe0mxEQuybJa7b3gIPGtixJ4zTNEtFCwA+HdAZtdkkZJMrA msh5IW7+yJ61vmiqq/cVWzjdWcT0PT4MbAAlaSg9rRQjaPfCSpRwm+RjQeZtYvDRjyPox wOlp24mfpzfxQpF0bCOIhOibZ6b1G7tnzM1RfjvcCS84v8uQI/iqxDqsbKwkfiaraMQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796412424; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=notSUSuvTRipS70F2s7rFeDHuleHyGCpu5Ag++nH1g0=; b=Ry3NU4PIsxUf8E4TBTIHQ1RTK2KFXW4NWVTZO0AcEhcuAfOO9f09rjy+qKrXFMpZcjLl TH5CNOV2FzsnXGI4EEzJNNRG4S2hhcqQC6wc0QijRyT6rulzN3Q1dTKvFtSu+GwxCmLAC DhDcXZSjgurUZSP8D98ibtr38bABa1xoQ9fPad61m+aRo3qZArDtFf1UMRE9yPE7T4IZy HKdvjb4Ltuqcynz4pUwY/nF6eLuC4OUFNO4suXyb8wqjmqFrgysr3dl3TSbyubxHaXuUO z8XY0uTjeoYdRlsVl6V7i18BqkLRN17uYXue0eqGUvWKrN1iV/MPj9j3fnkIdBbj9Kw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XFDsxMv1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E821606A322 for ; Fri, 4 Dec 2026 19:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XFDsxMv1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D94D91F0093B for ; Fri, 4 Dec 2026 19:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796412423; bh=notSUSuvTRipS70F2s7rFeDHuleHyGCpu5Ag++nH1g0=; h=From:Subject:Reply-To:Cc:In-Reply-To:References:Date; b=XFDsxMv1wPpHRkWPWbYdO2i8gKCTElM+2T1jaJ4CSi1SZCayaeA1HvpJRt17PHAd/ Gi9Twp9KPuaX9tohOPi8nR+CQW2qWS0+K6OCxdiRKB03+KZDJ81d2h3+JMXuwG7hCX RzCCiB1W3/1HAi5GqhfTeg/B/R54vkCBG/BGFiTB2pq2ock3MulHhyV26SGt2VSXrW 1iMeXwUfMXIVNS+95XLkBQ+fW3qmTDv5o8NQU17K/eCJZwPxperRTB8rr+/CZdbpJO pNCif7Tr8A72Ii6jwmKHCAFr+Khiw6QZRcQTOeuC4Ssb1cga8avnVoPAaZPkAapapz CaU1BdsL1TrUQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] smack: Hold rcu_read_lock() for the IPv6 host label lookups Reply-To: sashiko-reviews@lists.linux.dev Cc: linux-security-module@vger.kernel.org In-Reply-To: <20261204185112.1687982-1-praneethb2002@gmail.com> References: <20261204185112.1687982-1-praneethb2002@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 19:27:03 +0000 X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] smack: missing rcu_read_lock() in smk_find_entry() [1] -- commit 9573453fc6b675d33a1f2efa5ab515e7e7d7c7e2 Author: Praneeth Balasubramanian smack: Hold rcu_read_lock() for the IPv6 host label lookups This commit wraps process-context calls to smack_ipv6host_label() in smk_ipv6_port_check(), smack_socket_connect(), and smack_socket_sendmsg() with rcu_read_lock() and rcu_read_unlock(). > diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c > index 8e88ac65fd7fc..5329955a71402 100644 > --- a/security/smack/smack_lsm.c > +++ b/security/smack/smack_lsm.c > @@ -2855,6 +2855,7 @@ static int smk_ipv6_port_check(struct sock *sk, str= uct sockaddr_in6 *address, > unsigned short port; > struct smack_known *object; > =20 > + rcu_read_lock(); > if (act =3D=3D SMK_RECEIVING) { > skp =3D smack_ipv6host_label(address); > object =3D ssp->smk_in; > @@ -2862,6 +2863,7 @@ static int smk_ipv6_port_check(struct sock *sk, str= uct sockaddr_in6 *address, > skp =3D ssp->smk_out; > object =3D smack_ipv6host_label(address); > } > + rcu_read_unlock(); [Severity: High] This problem wasn't introduced by this patch, but does smk_find_entry() have the same missing RCU read lock [1]? security/smack/smack_access.c:smk_find_entry() { ... hlist_for_each_entry_rcu(skp, head, smk_hashed) if (strcmp(skp->smk_known, string) =3D=3D 0) return skp; ... } Callers such as smack_secctx_to_secid() in security/smack/smack_lsm.c invoke smk_find_entry() without holding rcu_read_lock() or smack_known_lock. smk_import_allocated_label() calls it under smack_known_lock, but hlist_for_each_entry_rcu() has no lockdep condition. With CONFIG_PROVE_RCU_LIST=3Dy, traversing smack_known_hash this way triggers the same lockdep warning about an RCU list walked outside a reader section. [1] https://sashiko.dev/#/bug/linux-29d4d0ee-96d6-4850-9369-f2bc7143c107 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204185112.1687= 982-1-praneethb2002@gmail.com?part=3D1