diff options
Diffstat (limited to 'net/netlink/attr.c')
-rw-r--r-- | net/netlink/attr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netlink/attr.c b/net/netlink/attr.c index 004139557e09..df5f820a4c32 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c | |||
@@ -67,6 +67,11 @@ static int validate_nla(struct nlattr *nla, int maxtype, | |||
67 | } | 67 | } |
68 | break; | 68 | break; |
69 | 69 | ||
70 | case NLA_BINARY: | ||
71 | if (pt->len && attrlen > pt->len) | ||
72 | return -ERANGE; | ||
73 | break; | ||
74 | |||
70 | default: | 75 | default: |
71 | if (pt->len) | 76 | if (pt->len) |
72 | minlen = pt->len; | 77 | minlen = pt->len; |