projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5751e17
)
netfilter: nf_tables: underflow in nft_parse_u32_check()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 12 Oct 2016 09:14:29 +0000
(12:14 +0300)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Mon, 17 Oct 2016 15:43:53 +0000
(17:43 +0200)
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>
net/netfilter/nf_tables_api.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index
b70d3ea
..
24db222
100644
(file)
--- 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)