netfilter: nf_tables: out-of-bound check in chain blob
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 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 <[email protected]>
--- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -9005,7 +9005,7 @@ static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *chacontinue ; } -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);
Signature · 1 line
2.30.2