Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09525a09 authored by Dan Carpenter's avatar Dan Carpenter Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_tables: underflow in nft_parse_u32_check()



We don't want to allow negatives here.

Fixes: 36b701fa ('netfilter: nf_tables: validate maximum value of u32 netlink attributes')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 5751e175
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4423,7 +4423,7 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx,
 */
unsigned int nft_parse_u32_check(const struct nlattr *attr, int max, u32 *dest)
{
	int val;
	u32 val;

	val = ntohl(nla_get_be32(attr));
	if (val > max)