netfilter: nft_lookup: fix catchall element handling with inverted lookups
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ aaa31047a6d25da0fa101da1ed544e1247949b40 · < e6107a4c74b54cb33e3bce162a63048ae5a6b198| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_lookup: fix catchall element handling with inverted lookups
nft_lookup_eval() decides whether a lookup matched (`found`) from the direct set lookup and priv->invert before falling back to the catchall element used by interval sets (e.g. nft_set_rbtree) for the open-ended default range. Since `found` is never recomputed after `ext` is replaced by the catchall lookup, inverted lookups (NFT_LOOKUP_F_INV, "!= @set") can wrongly match or wrongly skip the catchall element, producing the wrong verdict. Fold the catchall lookup into `ext` before computing `found`, matching the order already used by nft_objref_map_eval().
From the CVE record · Linux
The Linux kernel’s netfilter nft_lookup can produce an incorrect verdict when an inverted lookup uses an interval set with a catchall element. Network traffic evaluated against such a rule may wrongly match or skip the catchall element; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with netfilter rules that use inverted lookups and interval-set catchall elements should check their systems; affected versions are not specified.