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 800E9346AC5 for ; Tue, 16 Dec 2025 13:55:19 +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=1765893319; cv=none; b=OKyUh86+SIga0zmw6hSu8rnGMMSWsxsJ0FLqXIkm58SXozCdJbUWvIb9Chwjgi0vngwORqu5yMJdFsCdUkAW290Rrz6e3dF4Rek/rksh4E4EnMNrTGnb2kp143LXRah6lfT2BmEKN5QlTd0UTPI78JlvJOLwpUHioqk4AyGO9sg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765893319; c=relaxed/simple; bh=/SHelYixTPPojnjISXtE4Hbl4Rs/VTGh/RLYVftNRjA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l/hvARSnsYgiIrl+LJZxq9jLzr/xad5NaeVDTLZTtWLesy4wxtuwATgcS0OUT+rrLkpFBJEb2eVtEZQUsIJM6m5kwbewMJ0yddLMNORaGlDj4nqVzbJqoa4l2n9nMEx4miRvcyPhsikCtkyWAuTPIbVZBdfK8Q0qmU239qKk5Go= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TMAo7uye; 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="TMAo7uye" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E654DC4CEF5; Tue, 16 Dec 2025 13:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765893319; bh=/SHelYixTPPojnjISXtE4Hbl4Rs/VTGh/RLYVftNRjA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=TMAo7uyeCn0ZVA0hrEcwVHmfTcm4Ao8Y0QDurNG492lajBnPG930SAPwOXP9UOd2o +Ga8qTW5yYq4Pnj/fFQrb38yRLXbmMTq9kUfeKHMPWHUnaYA8OIBXungRdwF2JgvWw jKU+82bLZkbQuOlz/HzCQeijE3SrJ3ShEb9YiJUE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68206: netfilter: nft_ct: add seqadj extension for natted connections Date: Tue, 16 Dec 2025 14:54:35 +0100 Message-ID: <2025121632-CVE-2025-68206-47ba@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4146; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ey+9Oj5tr96sqmRDSSR321BTXWnxw6LdFh4pN8bcS9M=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOKTP+iFVncppyXJy46sw2+YWMkv2+tTq5gkY+89st9 JY+5ojuiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInITmRYsMd/w4n1zQLsa91D mB437uXcvG3iRYYFp2cwLJCT05jNKrc5RMF03oIp8wuZAA== 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: nft_ct: add seqadj extension for natted connections Sequence adjustment may be required for FTP traffic with PASV/EPSV modes. due to need to re-write packet payload (IP, port) on the ftp control connection. This can require changes to the TCP length and expected seq / ack_seq. The easiest way to reproduce this issue is with PASV mode. Example ruleset: table inet ftp_nat { ct helper ftp_helper { type "ftp" protocol tcp l3proto inet } chain prerouting { type filter hook prerouting priority 0; policy accept; tcp dport 21 ct state new ct helper set "ftp_helper" } } table ip nat { chain prerouting { type nat hook prerouting priority -100; policy accept; tcp dport 21 dnat ip prefix to ip daddr map { 192.168.100.1 : 192.168.13.2/32 } } chain postrouting { type nat hook postrouting priority 100 ; policy accept; tcp sport 21 snat ip prefix to ip saddr map { 192.168.13.2 : 192.168.100.1/32 } } } Note that the ftp helper gets assigned *after* the dnat setup. The inverse (nat after helper assign) is handled by an existing check in nf_nat_setup_info() and will not show the problem. Topoloy: +-------------------+ +----------------------------------+ | FTP: 192.168.13.2 | <-> | NAT: 192.168.13.3, 192.168.100.1 | +-------------------+ +----------------------------------+ | +-----------------------+ | Client: 192.168.100.2 | +-----------------------+ ftp nat changes do not work as expected in this case: Connected to 192.168.100.1. [..] ftp> epsv EPSV/EPRT on IPv4 off. ftp> ls 227 Entering passive mode (192,168,100,1,209,129). 421 Service not available, remote server has closed connection. Kernel logs: Missing nfct_seqadj_ext_add() setup call WARNING: CPU: 1 PID: 0 at net/netfilter/nf_conntrack_seqadj.c:41 [..] __nf_nat_mangle_tcp_packet+0x100/0x160 [nf_nat] nf_nat_ftp+0x142/0x280 [nf_nat_ftp] help+0x4d1/0x880 [nf_conntrack_ftp] nf_confirm+0x122/0x2e0 [nf_conntrack] nf_hook_slow+0x3c/0xb0 .. Fix this by adding the required extension when a conntrack helper is assigned to a connection that has a nat binding. The Linux kernel CVE team has assigned CVE-2025-68206 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit 1a64edf54f55d7956cf5a0d95898bc1f84f9b818 and fixed in 6.17.9 with commit 2b52d89cbbb0dbe3e948d8d9a91e704316dccfe6 Issue introduced in 4.12 with commit 1a64edf54f55d7956cf5a0d95898bc1f84f9b818 and fixed in 6.18 with commit 90918e3b6404c2a37837b8f11692471b4c512de2 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-68206 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/nft_ct.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/2b52d89cbbb0dbe3e948d8d9a91e704316dccfe6 https://git.kernel.org/stable/c/90918e3b6404c2a37837b8f11692471b4c512de2