]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nl80211: validate beacon head
authorJohannes Berg <johannes.berg@intel.com>
Fri, 20 Sep 2019 19:54:17 +0000 (21:54 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:25 +0000 (19:04 +0100)
commitffd30d74ad474aae344de79655d63cc03c032025
tree5d7035a07c4b6357ea4108e508bf0af3e92302ab
parentbc8ef90e2c9550a059dde3f54c5844559791c034
nl80211: validate beacon head

BugLink: https://bugs.launchpad.net/bugs/1849576
commit f88eb7c0d002a67ef31aeb7850b42ff69abc46dc upstream.

We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that this has already
been checked.

Add the necessary checks to the netlink policy.

Cc: stable@vger.kernel.org
Fixes: ed1b6cc7f80f ("cfg80211/nl80211: add beacon settings")
Link: https://lore.kernel.org/r/1569009255-I7ac7fbe9436e9d8733439eab8acbbd35e55c74ef@changeid
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: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/wireless/nl80211.c