netfilter: nft_ct: add seqadj extension for natted connections
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1a64edf54f55d7956cf5a0d95898bc1f84f9b818 · < 2b52d89cbbb0dbe3e948d8d9a91e704316dccfe6| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's netfilter FTP helper can miss a required TCP sequence-adjustment extension when it is assigned after NAT is set up. Network FTP traffic using passive mode can then cause NAT transfers to fail and produce a kernel warning. The input does not specify an authentication requirement or user interaction beyond the FTP operation.
Check Linux kernel deployments that use the netfilter FTP helper with NAT, particularly where the helper is assigned after NAT setup; affected versions are not specified.