mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 15:41:39 +00:00
netfilter: nf_tables: disable expression reduction infra
Either userspace or kernelspace need to pre-fetch keys inconditionally
before comparisons for this to work. Otherwise, register tracking data
is misleading and it might result in reducing expressions which are not
yet registers.
First expression is also guaranteed to be evaluated always, however,
certain expressions break before writing data to registers, before
comparing the data, leaving the register in undetermined state.
This patch disables this infrastructure by now.
Fixes: b2d306542f
("netfilter: nf_tables: do not reduce read-only expressions")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
2738d9d963
commit
9e539c5b6d
@ -8342,16 +8342,7 @@ EXPORT_SYMBOL_GPL(nf_tables_trans_destroy_flush_work);
|
||||
static bool nft_expr_reduce(struct nft_regs_track *track,
|
||||
const struct nft_expr *expr)
|
||||
{
|
||||
if (!expr->ops->reduce) {
|
||||
pr_warn_once("missing reduce for expression %s ",
|
||||
expr->ops->type->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nft_reduce_is_readonly(expr))
|
||||
return false;
|
||||
|
||||
return expr->ops->reduce(track, expr);
|
||||
return false;
|
||||
}
|
||||
|
||||
static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *chain)
|
||||
|
Loading…
Reference in New Issue
Block a user