wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_OPER_CHANNEL attribute
authorPhil Turnbull <philipturnbull@github.com>
Wed, 23 Nov 2022 15:35:41 +0000 (10:35 -0500)
committerKalle Valo <kvalo@kernel.org>
Thu, 24 Nov 2022 16:11:23 +0000 (18:11 +0200)
commit051ae669e4505abbe05165bebf6be7922de11f41
tree06cd5f66ab268ddd054abb6e0e74f5bef5981072
parentcd21d99e595ec1d8721e1058dcdd4f1f7de1d793
wifi: wilc1000: validate length of IEEE80211_P2P_ATTR_OPER_CHANNEL attribute

Validate that the IEEE80211_P2P_ATTR_OPER_CHANNEL attribute contains
enough space for a 'struct struct wilc_attr_oper_ch'. If the attribute is
too small then it triggers an out-of-bounds write later in the function.

Signed-off-by: Phil Turnbull <philipturnbull@github.com>
Tested-by: Ajay Kathat <ajay.kathat@microchip.com>
Acked-by: Ajay Kathat <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221123153543.8568-3-philipturnbull@github.com
drivers/net/wireless/microchip/wilc1000/cfg80211.c