Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DB60315D1 for ; Thu, 29 May 2025 13:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748524581; cv=none; b=OVKFTAYLF1mwR21X3zfuc/l+yJzR/yUwamZG6Ozj3M+h2Do1OPKOGapsJPCErTkqu1uZdarEhdrzUaIlMXJpg1WWDLX0/sIrVXTS7iie/NGZv7c0tZ5U3zIacy2QtfWRgEXsJUn8IDrdCwqlfugxgY/GmBbp8UmvFH/1JW9iqGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748524581; c=relaxed/simple; bh=Pw5pJ9k3HuuNJinlPnl8XbgEGakCrmrZRlbxD+SOqe8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=naVBQYBiERcUw9FoUKQjRQt0ZBpA9Ror+EObfDbXlj92gXXK9TwyG+AuYaGscLa3SbbB4l3/3zo1W6voaVjfqdcVGKXBTFN7K2LLcY06Ctbc00+oo9wk2qrLnXPoeV11vKxR5b6EyJQL/T6KtCByLwdAkrEJjwVLpvm9qi6em0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Zk4fwjat; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Zk4fwjat" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05372C4CEE7; Thu, 29 May 2025 13:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748524581; bh=Pw5pJ9k3HuuNJinlPnl8XbgEGakCrmrZRlbxD+SOqe8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Zk4fwjatjpZRHOUoJAT6QcmL7dZUtVs+qMXaCgpnhRfg5LwnwR3xfsnINXQTtxd7W RTvaFcqKg8t507ipxiqidBjEN7RgAOofpbCl2Dj7VWYeeBozJxqVH7aG3Z8pqh+rCH xuv5EnDE9lDpSPY1vKmpqxTcajMxkLE3ciCgZlaI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37997: netfilter: ipset: fix region locking in hash types Date: Thu, 29 May 2025 15:16:04 +0200 Message-ID: <2025052902-CVE-2025-37997-2c6c@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3321; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pU0Gl/CdgZ2KYwQ42y6QZqgGblm2mwPwuGNSCyS+Tt4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkWcULNnLq5J197KNrz9QSeOnaBMYRPiGuq8mrJHMank 9ruXWPsiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInkHmOYw9vS4LFX+v/8hWdi lELFAu4d22pYyTCHLzj98vlVLB++HTqbeiKQ9y9/fvgMAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: netfilter: ipset: fix region locking in hash types Region locking introduced in v5.6-rc4 contained three macros to handle the region locks: ahash_bucket_start(), ahash_bucket_end() which gave back the start and end hash bucket values belonging to a given region lock and ahash_region() which should give back the region lock belonging to a given hash bucket. The latter was incorrect which can lead to a race condition between the garbage collector and adding new elements when a hash type of set is defined with timeouts. The Linux kernel CVE team has assigned CVE-2025-37997 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 5.15.183 with commit 82c1eb32693bc48251d92532975e19160987e5b9 Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 6.1.139 with commit aa77294b0f73bb8265987591460cd25b8722c3df Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 6.6.91 with commit a3dfec485401943e315c394c29afe2db8f9481d6 Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 6.12.29 with commit e2ab67672b2288521a6146034a971f9a82ffc5c5 Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 6.14.7 with commit 6e002ecc1c8cfdfc866b9104ab7888da54613e59 Issue introduced in 5.6 with commit f66ee0410b1c3481ee75e5db9b34547b4d582465 and fixed in 6.15 with commit 8478a729c0462273188263136880480729e9efca Issue introduced in 5.4.24 with commit 5dd9488ae41070b69d2f4acb580f77db5705f9ca Issue introduced in 5.5.8 with commit a469bab3386aebff33c59506f3a95e35b91118fd Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-37997 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/netfilter/ipset/ip_set_hash_gen.h Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/82c1eb32693bc48251d92532975e19160987e5b9 https://git.kernel.org/stable/c/aa77294b0f73bb8265987591460cd25b8722c3df https://git.kernel.org/stable/c/a3dfec485401943e315c394c29afe2db8f9481d6 https://git.kernel.org/stable/c/e2ab67672b2288521a6146034a971f9a82ffc5c5 https://git.kernel.org/stable/c/6e002ecc1c8cfdfc866b9104ab7888da54613e59 https://git.kernel.org/stable/c/8478a729c0462273188263136880480729e9efca