]> git.baikalelectronics.ru Git - kernel.git/commit
wil6210: validate wil_pmc_alloc parameters
authorMaya Erez <qca_merez@qca.qualcomm.com>
Mon, 28 Nov 2016 11:49:01 +0000 (13:49 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 1 Dec 2016 11:20:31 +0000 (13:20 +0200)
commit66f90510a892fdc46cc1fab8184ee7ce3c1a2fb3
tree6c8ff295e6baff3146b4d740ed8bab5b9603f864
parent0cc4cbb54aaa5d2b6dbd91dd10d413fce1969421
wil6210: validate wil_pmc_alloc parameters

num_descriptors and descriptor_size needs to be
checked for:
1) not being negative values
2) no overflow occurs when these are multiplied
together as done in wil_pmc_read.
An overflow of two signed integers is undefined
behavior.

Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/wil6210/pmc.c