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:22:23 +0000 (11:22 +0100)
commit38762a516e0cec3d194b2a9caf0607e3c7dad5ff
treed3804255baecaa4f877c62625bf464b5abe7ac6a
parent2586fa0007dc6b7745da14250be7e3aae706b128
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