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 68CF835AAD0 for ; Thu, 11 Sep 2025 16:53:46 +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=1757609626; cv=none; b=Pm+3q2VAUa0navGL6H4A1PpqjUXcLLoarzjqwaWLWmDt4mqOrMtCKxffg2OIch0trhJcnRUxFF2MK98iRUn/Sbh5ekvjg2hiqCwfdH0cQLvjugHkT/lXpYmyQE+ab1J9jrS9GI9CihKZ0E+rRk2CP+qf855ionu//Qd393vtmIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757609626; c=relaxed/simple; bh=vRtDGcnhP8eyB+HQhY2gDl0lK7tfaZq5EMAneV5F9UM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oW/esKY4hxtOEN0KQaL2xeqNTMwhsjC71n9UvoAt+ApWYCI/dkfE5HG7lHsBer4X/coP7Y3C19M0QTSDlV8lqnqLf5ue6EnCfiZ9FxYmx7FoZwmuwckWf11pqqd4FV1OIBRAsBKJxe3La7IO6LeSptykxDdXBOCGtyNcBZ83mrU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=elhMggTF; 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="elhMggTF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4BBAC4CEF0; Thu, 11 Sep 2025 16:53:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757609626; bh=vRtDGcnhP8eyB+HQhY2gDl0lK7tfaZq5EMAneV5F9UM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=elhMggTFeMtA2LwY5b9Ss/3xQrinzzhdDItQa6ZfZsVPkEdk6KCuwMppyQgc6x23r sz5a6+haLMCGh47c56+j9cpL9OAY5FPVM10STZyrt6eRK3U2NrnfClFQarreiTAmHA DN7DtqbsYwdAKUq3LNYjD4ktL0ELNC5K8RRAQ6FA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39764: netfilter: ctnetlink: remove refcounting in expectation dumpers Date: Thu, 11 Sep 2025 18:53:04 +0200 Message-ID: <2025091147-CVE-2025-39764-b300@gregkh> X-Mailer: git-send-email 2.51.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=2237; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bVGT6BSIPFI1wKvQMm3lyyFUT1pghq/yytA7IGBaAAg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmH/sV7b1TbcLb6xTu3mjLhj24s67+eLAudXj3x11OBJ 5u+hGzS6IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJbNVhmF+2JKf8nsCShpSX 1z+s62CU1A1S4GCYn17x0WCzzPUPyw+c7XtlPvVdWJiFCQA= 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: ctnetlink: remove refcounting in expectation dumpers Same pattern as previous patch: do not keep the expectation object alive via refcount, only store a cookie value and then use that as the skip hint for dump resumption. AFAICS this has the same issue as the one resolved in the conntrack dumper, when we do if (!refcount_inc_not_zero(&exp->use)) to increment the refcount, there is a chance that exp == last, which causes a double-increment of the refcount and subsequent memory leak. The Linux kernel CVE team has assigned CVE-2025-39764 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.23 with commit cf6994c2b9812a9f02b99e89df411ffc5db9c779 and fixed in 6.16.2 with commit a4d634ded4d3d400f115d84f654f316f249531c9 Issue introduced in 2.6.23 with commit cf6994c2b9812a9f02b99e89df411ffc5db9c779 and fixed in 6.17-rc2 with commit 1492e3dcb2be3aa46d1963da96aa9593e4e4db5a 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-39764 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_netlink.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/a4d634ded4d3d400f115d84f654f316f249531c9 https://git.kernel.org/stable/c/1492e3dcb2be3aa46d1963da96aa9593e4e4db5a