]> git.karo-electronics.de Git - karo-tx-linux.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)
commitca260ece6a57dc7d751e0685f51fa2c55d851873
tree380dbd246d27897a2e4aa561e23f4d850187d304
parent5ce33b603063f36272fcfb1b4a5fde69f46eca88
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: a1030e92c150 ("[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