projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e72634
)
nl80211: fix MAC address validation
author
Eliad Peller
<eliad@wizery.com>
Thu, 24 Nov 2011 16:13:56 +0000
(18:13 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 9 Dec 2011 16:52:31 +0000
(08:52 -0800)
commit
e007b857e88097c96c45620bf3b04a4e309053d1
upstream.
MAC addresses have a fixed length. The current
policy allows passing < ETH_ALEN bytes, which
might result in reading beyond the buffer.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/wireless/nl80211.c
patch
|
blob
|
history
diff --git
a/net/wireless/nl80211.c
b/net/wireless/nl80211.c
index 3dac76f33b947ceda2b4f566aa1595520c1cb2f1..0c2b8080547f480fe244f2a68c776bd64b99e504 100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-83,8
+83,8
@@
static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_IFINDEX] = { .type = NLA_U32 },
[NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ-1 },
- [NL80211_ATTR_MAC] = { .
type = NLA_BINARY, .
len = ETH_ALEN },
- [NL80211_ATTR_PREV_BSSID] = { .
type = NLA_BINARY, .
len = ETH_ALEN },
+ [NL80211_ATTR_MAC] = { .len = ETH_ALEN },
+ [NL80211_ATTR_PREV_BSSID] = { .len = ETH_ALEN },
[NL80211_ATTR_KEY] = { .type = NLA_NESTED, },
[NL80211_ATTR_KEY_DATA] = { .type = NLA_BINARY,