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 84A0A1F5FA for ; Sun, 19 Jan 2025 10:19:14 +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=1737281954; cv=none; b=PRDDwC4Gx/ntp/aN6GxLsCy4Z5c37cARqXiMEGXaEkFkGJ6+QmH8F91MdsT3NznTD7mdITdLaKOIHxXic937mx4eRGmUy7bkSl/CC7u241ooVT0yZEkWa1fLBGjX3UurrpLKIdo0niqz2x43rJgDoECzZ/uiKXH1LBd69JVfJGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281954; c=relaxed/simple; bh=dgrwrWoapmWBZGsFd/J03YTRd7s/iGP+cRGKe6+z58k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Sku5KIHwGC1POUOnTMsAxP2UzUQ82tQl2v9iWQ7VnA6RGghvO1zsJMNmBBIdjtN6AimcqC8csfSZ6RhgAefeblWZegSItM5DBmQ8wZy4F8wFDtU7F22mKcyvyk5eSZ26S0mp05NHrM/qNz1wLd4RQiLZebxfOdBy11+P1yFxQPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mcdKDxyl; 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="mcdKDxyl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 989E5C4CED6; Sun, 19 Jan 2025 10:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737281954; bh=dgrwrWoapmWBZGsFd/J03YTRd7s/iGP+cRGKe6+z58k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mcdKDxylkL6qV3GAK4SsmPXBeCSfAKZks241mbRpqY5SCQDSNQkpgig7sdoYxp3Dx DYwiRemsx034HyT6Ug54NgGnXcOIPn0vlxVTu326Egg0zBE4sigXBQXooYi+w2ZHCW NUNLRbtYjkWEOi4RDJiBJ/65zLqYDAPLKKkJT7bE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21648: netfilter: conntrack: clamp maximum hashtable size to INT_MAX Date: Sun, 19 Jan 2025 11:17:57 +0100 Message-ID: <2025011946-CVE-2025-21648-bcda@gregkh> X-Mailer: git-send-email 2.48.1 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=2572; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dgrwrWoapmWBZGsFd/J03YTRd7s/iGP+cRGKe6+z58k=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9F70026fPmxErsnnl3sT9+9IZWsv+7jevjGaaZcCzx ZDxaEx/RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExE9j7Dgvkv3RRefnw/yXvJ kxzj1ErLjx2rPjPMFeZbmLJ1w6P/L2YuOLLQ65cMa8HynwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: netfilter: conntrack: clamp maximum hashtable size to INT_MAX Use INT_MAX as maximum size for the conntrack hashtable. Otherwise, it is possible to hit WARN_ON_ONCE in __kvmalloc_node_noprof() when resizing hashtable because __GFP_NOWARN is unset. See: 0708a0afe291 ("mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls") Note: hashtable resize is only possible from init_netns. The Linux kernel CVE team has assigned CVE-2025-21648 to this issue. Affected and fixed versions =========================== Issue introduced in 4.7 with commit 9cc1c73ad66610bffc80b691136ffc1e9a3b1a58 and fixed in 6.1.125 with commit 5552b4fd44be3393b930434a7845d8d95a2a3c33 Issue introduced in 4.7 with commit 9cc1c73ad66610bffc80b691136ffc1e9a3b1a58 and fixed in 6.6.72 with commit d5807dd1328bbc86e059c5de80d1bbee9d58ca3d Issue introduced in 4.7 with commit 9cc1c73ad66610bffc80b691136ffc1e9a3b1a58 and fixed in 6.12.10 with commit f559357d035877b9d0dcd273e0ff83e18e1d46aa Issue introduced in 4.7 with commit 9cc1c73ad66610bffc80b691136ffc1e9a3b1a58 and fixed in 6.13-rc7 with commit b541ba7d1f5a5b7b3e2e22dc9e40e18a7d6dbc13 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-21648 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/nf_conntrack_core.c 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/5552b4fd44be3393b930434a7845d8d95a2a3c33 https://git.kernel.org/stable/c/d5807dd1328bbc86e059c5de80d1bbee9d58ca3d https://git.kernel.org/stable/c/f559357d035877b9d0dcd273e0ff83e18e1d46aa https://git.kernel.org/stable/c/b541ba7d1f5a5b7b3e2e22dc9e40e18a7d6dbc13