OSDN Git Service

wifi: wilc1000: validate number of channels
authorPhil Turnbull <philipturnbull@github.com>
Wed, 23 Nov 2022 15:35:43 +0000 (10:35 -0500)
committerKalle Valo <kvalo@kernel.org>
Thu, 24 Nov 2022 16:11:23 +0000 (18:11 +0200)
commit0cdfa9e6f0915e3d243e2393bfa8a22e12d553b0
tree7164ee3d4cfec98aeb586415ec587c6fa30e5315
parentf9b62f9843c7b0afdaecabbcebf1dbba18599408
wifi: wilc1000: validate number of channels

There is no validation of 'e->no_of_channels' which can trigger an
out-of-bounds write in the following 'memset' call. Validate that the
number of channels does not extends beyond the size of the channel list
element.

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-5-philipturnbull@github.com
drivers/net/wireless/microchip/wilc1000/cfg80211.c