projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sctp: validate chunk len before actually using it
[cascardo/linux.git]
/
net
/
netfilter
/
nft_immediate.c
diff --git
a/net/netfilter/nft_immediate.c
b/net/netfilter/nft_immediate.c
index
db3b746
..
d17018f
100644
(file)
--- a/
net/netfilter/nft_immediate.c
+++ b/
net/netfilter/nft_immediate.c
@@
-53,6
+53,10
@@
static int nft_immediate_init(const struct nft_ctx *ctx,
tb[NFTA_IMMEDIATE_DATA]);
if (err < 0)
return err;
+
+ if (desc.len > U8_MAX)
+ return -ERANGE;
+
priv->dlen = desc.len;
priv->dreg = nft_parse_register(tb[NFTA_IMMEDIATE_DREG]);