Skip to content

Commit 63283dd

Browse files
committed
netfilter: nf_tables: skip transaction if no update flags in tables
Skip transaction handling for table updates with no changes in the flags. This fixes a crash when passing the table flag with all bits unset. Reported-by: Ana Rey <anarey@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent e940f5d commit 63283dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ static int nf_tables_updtable(struct nft_ctx *ctx)
407407
if (flags & ~NFT_TABLE_F_DORMANT)
408408
return -EINVAL;
409409

410+
if (flags == ctx->table->flags)
411+
return 0;
412+
410413
trans = nft_trans_alloc(ctx, NFT_MSG_NEWTABLE,
411414
sizeof(struct nft_trans_table));
412415
if (trans == NULL)

0 commit comments

Comments
 (0)