netfilter: xt_nat: reject unsupported target families
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c7232c9979cba684c50b64c513c4a83c9aa70563 · < 679ced28a9dc2f6dc679eb05027d779693e60902| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: xt_nat: reject unsupported target families
xt_nat SNAT and DNAT target handlers assume IP-family conntrack state is present and can dereference a NULL pointer when instantiated from an unsupported family through nft_compat. A bridge-family compat rule can therefore trigger a NULL-dereference in nf_nat_setup_info().
Reject non-IP families in xt_nat_checkentry() so unsupported targets cannot be installed. Keep NFPROTO_INET allowed for valid inet NAT compat users and leave the runtime fast path unchanged.
[ The crash was fixed via 9dbba7e694ec ("netfilter: nft_compat: ebtables emulation must reject non-bridge targets"), so this patch is no longer critical. Nevertheless, NAT is only relevant for ipv4/ipv6, so this extra family check is a good idea in any case. ]
From the CVE record · Linux
Linux kernel xt_nat SNAT and DNAT handlers can dereference a NULL pointer when installed for an unsupported family through nft_compat. An attacker able to install a bridge-family compat rule could trigger a kernel crash; the input does not specify whether authentication or user interaction is required.
Engineers running Linux kernels with netfilter xt_nat and nft_compat should check their systems; affected versions are not specified.