mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
[ Upstream commit 113661e07460a6604aacc8ae1b23695a89e7d4b3 ]
It is still possible to set on the NFT_SET_CONCAT flag by specifying a
set size and no field description, report EINVAL in such case.
Fixes: 1b6345d416 ("netfilter: nf_tables: check NFT_SET_CONCAT flag if field_count is specified")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b56bce52f9
commit
4a45e7e7d2
@@ -4773,8 +4773,12 @@ static int nf_tables_newset(struct sk_buff *skb, const struct nfnl_info *info,
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (desc.field_count > 1 && !(flags & NFT_SET_CONCAT))
|
if (desc.field_count > 1) {
|
||||||
|
if (!(flags & NFT_SET_CONCAT))
|
||||||
|
return -EINVAL;
|
||||||
|
} else if (flags & NFT_SET_CONCAT) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
} else if (flags & NFT_SET_CONCAT) {
|
} else if (flags & NFT_SET_CONCAT) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user