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 01D183090C2 for ; Wed, 3 Sep 2025 13:01:32 +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=1756904494; cv=none; b=ahjwOsZHPTaXx8njP4zs3ONSU0zl5WzTa2JJJKd+Qg7UWDdixetad5QamnhRv6A/puj8S76HrsRcNLr4bI5F6x/4i3MUTlPPqkJeMhV03I+OPvdUH+bOOoarx7yuoOR1fll5H4bO6hqA8Mww7iAv4O/B9iF/Ex1c1w+KLx2YJ2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756904494; c=relaxed/simple; bh=HQS7JKysHSJCjulhB/EOcjnc2aPMTnGR+bybd1jtxG8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fc6QCdTOMUkGQSgKQfspp4qQIWe20TPY95Ast5NiJORxgd2RQE2qhws0YasNgmxB6RfMRtRPaogVco7qE1HeO4taVBEPw1FrghjimC4BEcqqEI4UNuXaLiNLrydKgWylfyiVl6c62mfoD5etDjtupi6B5H+pw1apY0rS1/TFoBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z167hv/A; 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="z167hv/A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8E42C4CEF0; Wed, 3 Sep 2025 13:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756904492; bh=HQS7JKysHSJCjulhB/EOcjnc2aPMTnGR+bybd1jtxG8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=z167hv/AjxjYRIpie9vur4jU0TRnT8bc/PPjzx8mFKgm+VwATM3IULztrbD+m9e0V 6qkeG/0/OCS+GtWa51nh/UsKzFuOnmwkWiFNmS0Xv8RXCFJTKGVzyJGGJL00pUwXeI jDxoXYBWsle2FYijGszA6KvH8S8yKBiBB6R/0zQ0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38678: netfilter: nf_tables: reject duplicate device on updates Date: Wed, 3 Sep 2025 15:01:19 +0200 Message-ID: <2025090318-CVE-2025-38678-faa7@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=2411; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/5d+XjNbmp8r3G2UCCz0G1qpK79B093haBY/4ITJzMM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7bOTWfZj4R0l2QvdpV1uz/tQrHi66tfq3wnZ+Wfzpz GcrkTiljhgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIjSnDPEtrcYVJrF98OTgd zD5wvLy+Wqm2kmHGHMspf94dcV/K/WBC202P5sZdreUA 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: nf_tables: reject duplicate device on updates A chain/flowtable update with duplicated devices in the same batch is possible. Unfortunately, netdev event path only removes the first device that is found, leaving unregistered the hook of the duplicated device. Check if a duplicated device exists in the transaction batch, bail out with EEXIST in such case. WARNING is hit when unregistering the hook: [49042.221275] WARNING: CPU: 4 PID: 8425 at net/netfilter/core.c:340 nf_hook_entry_head+0xaa/0x150 [49042.221375] CPU: 4 UID: 0 PID: 8425 Comm: nft Tainted: G S 6.16.0+ #170 PREEMPT(full) [...] [49042.221382] RIP: 0010:nf_hook_entry_head+0xaa/0x150 The Linux kernel CVE team has assigned CVE-2025-38678 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 78d9f48f7f44431a25da2b46b3a8812f6ff2b981 and fixed in 6.16.2 with commit d7615bde541f16517d6790412da6ec46fa8a4c1f Issue introduced in 5.8 with commit 78d9f48f7f44431a25da2b46b3a8812f6ff2b981 and fixed in 6.17-rc2 with commit cf5fb87fcdaaaafec55dcc0dc5a9e15ead343973 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-38678 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_tables_api.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/d7615bde541f16517d6790412da6ec46fa8a4c1f https://git.kernel.org/stable/c/cf5fb87fcdaaaafec55dcc0dc5a9e15ead343973