Linux kernel denial of service in netfilter nft_byteorder conversion
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_byteorder: remove multi-register support
64bit byteorder conversion is broken when several registers need to be converted because the source register array advances in steps for 4 bytes instead of 8:
for (i = ... src64 = nft_reg_load64(&src[i]); ~~~~~ u32 *src nft_reg_store64(&dst64[i],
Remove the multi-register support, it has other issues as well:
Pablo points out that commit caf3ef7468f7 ("netfilter: nf_tables: prevent OOB access in nft_byteorder_eval") alters semantics: before the loop operated on registers, i.e. for ( ... ) dst32[i] = htons((u16)src32[i])
.. but after the patch it will operate on bytes, which makes this useless to convert e.g. concatenations, which store each compound in its own register.
Multi-convert of u32 has one theoretical application:
From the CVE record · Linux
The Linux kernel's nft_byteorder code handles byte-order conversion incorrectly when converting multiple registers. The input does not describe an attacker action or establish network, authentication, or user-interaction conditions. With nftables versions before 1.1.0, some affected rulesets fail to load after this change.
Engineers running Linux kernels with netfilter and nftables, particularly nftables versions before 1.1.0, should check their systems; affected kernel versions are not specified.