OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'net-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[tomoyo/tomoyo-test1.git]
/
net
/
netfilter
/
nfnetlink_osf.c
diff --git
a/net/netfilter/nfnetlink_osf.c
b/net/netfilter/nfnetlink_osf.c
index
8f1bfa6
..
50723ba
100644
(file)
--- a/
net/netfilter/nfnetlink_osf.c
+++ b/
net/netfilter/nfnetlink_osf.c
@@
-315,6
+315,14
@@
static int nfnl_osf_add_callback(struct sk_buff *skb,
f = nla_data(osf_attrs[OSF_ATTR_FINGER]);
f = nla_data(osf_attrs[OSF_ATTR_FINGER]);
+ if (f->opt_num > ARRAY_SIZE(f->opt))
+ return -EINVAL;
+
+ if (!memchr(f->genre, 0, MAXGENRELEN) ||
+ !memchr(f->subtype, 0, MAXGENRELEN) ||
+ !memchr(f->version, 0, MAXGENRELEN))
+ return -EINVAL;
+
kf = kmalloc(sizeof(struct nf_osf_finger), GFP_KERNEL);
if (!kf)
return -ENOMEM;
kf = kmalloc(sizeof(struct nf_osf_finger), GFP_KERNEL);
if (!kf)
return -ENOMEM;