mac80211: Check crypto_aead_encrypt for errors
authorDaniel Phan <daniel.phan36@gmail.com>
Tue, 9 Mar 2021 20:41:36 +0000 (12:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Apr 2021 11:36:08 +0000 (13:36 +0200)
commit7705c48b8695c8a05fe0c23443c5da7e84a9eb76
tree6e82003e50778abffe5d26220d92f5e58cacb8ab
parent05878b6819810c28563015693c49f85ddc6fbb92
mac80211: Check crypto_aead_encrypt for errors

[ Upstream commit 58d25626f6f0ea5bcec3c13387b9f835d188723d ]

crypto_aead_encrypt returns <0 on error, so if these calls are not checked,
execution may continue with failed encrypts.  It also seems that these two
crypto_aead_encrypt calls are the only instances in the codebase that are
not checked for errors.

Signed-off-by: Daniel Phan <daniel.phan36@gmail.com>
Link: https://lore.kernel.org/r/20210309204137.823268-1-daniel.phan36@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/aead_api.c
net/mac80211/aes_gmac.c