print_eht_info() stores the EHT PHY capabilities in an 8-byte buffer, but the kernel provides 9 bytes. __print_eht_capa() prints all 9 bytes and accesses two bits of the ninth byte through phy_cap[2]. Both accesses go past the end of the buffer, and the ninth byte is lost when copying the attribute. Increase the buffer size to accommodate all 9 bytes. Fixes: 4c859917316b ("iw: util: update and clean up eht capa printing") Signed-off-by: Josef Schlehofer --- Checked with an AddressSanitizer build that feeds print_eht_info() a 9-byte EHT PHY attribute. Without the fix it reports a stack-buffer-overflow in __print_eht_capa(), with it the ninth byte and both of its bits are printed. util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 1bad4ea..1a35352 100644 --- a/util.c +++ b/util.c @@ -1769,7 +1769,7 @@ void print_eht_info(struct nlattr *nl_iftype, int band) { struct nlattr *tb[NL80211_BAND_IFTYPE_ATTR_MAX + 1]; __u8 mac_cap[2] = { 0 }; - __u32 phy_cap[2] = { 0 }; + __u32 phy_cap[3] = { 0 }; __u8 mcs_set[13] = { 0 }; __u8 ppet[31] = { 0 }; __u16 he_phy_cap[6] = { 0 }; -- 2.54.0 (Apple Git-157)