]> git.baikalelectronics.ru Git - kernel.git/commit
zd1211rw: fix NULL-deref at probe
authorJohan Hovold <johan@kernel.org>
Mon, 13 Mar 2017 12:44:21 +0000 (13:44 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 22 Mar 2017 09:03:37 +0000 (11:03 +0200)
commit4b3eb4b24665276d422c4836dc17bcc73ef701a3
tree380dbd246d27897a2e4aa561e23f4d850187d304
parente46b8763a32855d15de61b67def2f9e2badab41d
zd1211rw: fix NULL-deref at probe

Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer or accessing memory beyond the endpoint array should a
malicious device lack the expected endpoints.

Fixes: f109ab3bf9dd ("[PATCH] zd1211rw: Convert installer CDROM device into WLAN device")
Cc: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/zydas/zd1211rw/zd_usb.c