cfg80211: wext: Reject malformed SSID elements

Ensure the SSID element is bounds-checked prior to invoking memcpy()
with its length field.

Cc: <stable@vger.kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Kees Cook <keescook@chromium.org>
Reported-by: Nicolas Waisman <nico@semmle.com>
Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
CVE-2019-17133
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
Change-Id: If6a80f42391e0fef49c66260e4ef47000197e095
1 file changed