staging: wfx: fix potential vulnerability to spectre
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Fri, 11 Oct 2019 16:47:51 +0000 (16:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2019 13:37:19 +0000 (15:37 +0200)
commit88d0facf186c6c652c2203536fecd77089b43a4e
tree203d0e9852f5dabf88b923c961deb6625a5d559c
parent44288f1101feba11beef9536b176dadae420d874
staging: wfx: fix potential vulnerability to spectre

array_index_nospec() should be applied after a bound check.

Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames")
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191011164746.2518-1-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/wfx.h