]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: validate cipher scheme PN length better
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 May 2015 14:32:29 +0000 (16:32 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 May 2015 11:30:00 +0000 (13:30 +0200)
commitc5966b6878557deb4466f927864aeb34eb136ca3
tree3d01512741ad7b572f7ad25519680fe02dcce569
parent68805f32103f216e69f5014e030a497bdf86311c
mac80211: validate cipher scheme PN length better

Currently, a cipher scheme can advertise an arbitrarily long
sequence counter, but mac80211 only supports up to 16 bytes
and the initial value from userspace will be truncated.

Fix two things:
 * don't allow the driver to register anything longer than
   the 16 bytes that mac80211 reserves space for
 * require userspace to specify a starting value with the
   correct length (or none at all)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/key.c
net/mac80211/main.c