mac80211: use constant time comparison with keys
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 17 Oct 2017 18:32:07 +0000 (20:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Nov 2017 10:30:39 +0000 (11:30 +0100)
commit362cce4f4197826f371fd2876da576b75cccf7ea
treee2c37dfeb41880e8608f5f6621ab59e469c92c3e
parenta9ab1b2e30e898440a22d7b1d7a5b0b7c6a8791f
mac80211: use constant time comparison with keys

commit 2bdd713b92a9cade239d3c7d15205a09f556624d upstream.

Otherwise we risk leaking information via timing side channel.

Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/key.c