Skip to content

Commit

Permalink
nl80211: fix parsing of NL80211_BAND_ATTR_VHT_MCS_SET attribute
Browse files Browse the repository at this point in the history
The length constraint of 16 byte was incorrect, the attribute is 8 bytes
long; two bytes for the RX MCS set, two bytes for the highest RX rate,
two bytes for the TX MCS set and two bytes for the highest TX rate.

Signed-off-by: Jo-Philipp Wich <[email protected]>
  • Loading branch information
jow- committed Dec 14, 2023
1 parent 7e5830e commit 5c8fd34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ uc_nl_convert_rta_vht_mcs(const uc_nl_attr_spec_t *spec, struct nl_msg *msg, str
uint16_t u16;
uint8_t *mcs;

if (!nla_check_len(tb[spec->attr], 16))
if (!nla_check_len(tb[spec->attr], 8))
return NULL;

mcs = nla_data(tb[spec->attr]);
Expand Down

0 comments on commit 5c8fd34

Please sign in to comment.