1
0

qcacmn: Fix NDP Discovery MAC address policy

The current qca_wlan_vendor_ndp_policy for attribute
QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR uses type NLA_BINARY.
Unfortunately this type uses the len as a maximum length and not a
minimum length which means that nla_parse() cannot guarantee that 6
bytes of MAC address are present.  Change the policy to use type
NLA_UNSPEC so that nla_parse() will ensure that the NDP Discovery MAC
address TLV contains (at least) 6 bytes.

Change-Id: I2c7e1efdb413dbd2f79c36ed1626c006b86e8b5b
CRs-Fixed: 2237658
Este cometimento está contido em:
Jeff Johnson
2018-05-07 17:42:32 -07:00
cometido por nshrivas
ascendente 2c59b94216
cometimento 654aee1236

Ver ficheiro

@@ -59,7 +59,7 @@ vendor_attr_policy[QCA_WLAN_VENDOR_ATTR_NDP_PARAMS_MAX + 1] = {
.len = sizeof(uint32_t)
},
[QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR] = {
.type = NLA_BINARY,
.type = NLA_UNSPEC,
.len = QDF_MAC_ADDR_SIZE
},
[QCA_WLAN_VENDOR_ATTR_NDP_CONFIG_SECURITY] = {