mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
netfilter: nf_tables: out-of-bound check in chain blob
Add current size of rule expressions to the boundary check. Fixes: 2c865a8a28a1 ("netfilter: nf_tables: add rule blob layout") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
24e227896b
commit
08e42a0d3a
@ -9007,7 +9007,7 @@ static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *cha
|
||||
continue;
|
||||
}
|
||||
|
||||
if (WARN_ON_ONCE(data + expr->ops->size > data_boundary))
|
||||
if (WARN_ON_ONCE(data + size + expr->ops->size > data_boundary))
|
||||
return -ENOMEM;
|
||||
|
||||
memcpy(data + size, expr, expr->ops->size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user