]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cfg80211: wext: avoid copying malformed SSIDs
authorWill Deacon <will@kernel.org>
Fri, 4 Oct 2019 09:51:32 +0000 (10:51 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:52 +0000 (19:04 +0100)
commit1419c4ab6e303f941b8bf6b677a0bcaa5ca33e00
tree9cf4b65602be11b52182baf1150f282b71424951
parent6d359ea0cc816cb97d4c6e6c88e7c1a54e824467
cfg80211: wext: avoid copying malformed SSIDs

BugLink: https://bugs.launchpad.net/bugs/1851876
commit 4ac2813cc867ae563a1ba5a9414bfb554e5796fa upstream.

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

Cc: <stable@vger.kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Reported-by: Nicolas Waisman <nico@semmle.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20191004095132.15777-2-will@kernel.org
[adjust commit log a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/wireless/wext-sme.c