mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-27 15:42:33 +07:00
netfilter: nf_tables: underflow in nft_parse_u32_check()
We don't want to allow negatives here.
Fixes: 36b701fae1
('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>
This commit is contained in:
parent
5751e175c6
commit
09525a09ad
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user