diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-10-12 09:14:29 (GMT) |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-10-17 15:43:53 (GMT) |
commit | 09525a09ad3099efd9ba49b0b90bddc350d6b53a (patch) | |
tree | dc43e492d23803c86071082981d33ef7094fc5f7 | |
parent | 5751e175c60be1b4113d1e9bfa011b58ec01f104 (diff) | |
download | linux-09525a09ad3099efd9ba49b0b90bddc350d6b53a.tar.xz |
netfilter: nf_tables: underflow in nft_parse_u32_check()
We don't want to allow negatives here.
Fixes: 36b701fae12a ('netfilter: nf_tables: validate maximum value of u32 netlink attributes')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_tables_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index b70d3ea..24db222 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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) |