netfilter: nf_tables: skip double clone set expressions on element insert
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 · < 43559058d21e0493aa220ac167e0279334dea5f9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: skip double clone set expressions on element insert
Both the dynset and newsetelem path clone the existing set expressions when setting set element expressions if no override expressions are provided. This results in a double clone, once to clone the template set expressions then another clone on the new element. Add a flag to annotate if userspace provides a override expression (ie. expression of the same type of the set but different configuration), otherwise borrow the existing expression from the set. Add conditionals to release expression iif they represent an override. Use this new override_exprs flag to dump the dynset expression override to userspace.
This simplifies the existing logic and it also fixes a bug with the connlimit expression which results in a module refcount imbalance WARNING splat when resorting on the default set expressions.
From the CVE record · Linux
The Linux kernel’s nf_tables code can clone set expressions twice when inserting an element without an override expression. With a default connlimit set expression, this can cause a module refcount imbalance warning. The input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels with nf_tables should check their versions against the vendor advisory; affected versions are not specified.