]> git.ipfire.org Git - thirdparty/hostap.git/commit
AP: Avoid double free of key data buffer if AES unwrap fails
authorHu Wang <quic_huw@quicinc.com>
Wed, 6 Nov 2024 10:50:04 +0000 (02:50 -0800)
committerJouni Malinen <j@w1.fi>
Thu, 7 Nov 2024 09:50:00 +0000 (11:50 +0200)
commit65d865e62706cbe89dae9be9601c97a5d3b32c9d
treee60f6d6ec9ec247d7d499e8e17aad253486f06d7
parent422c5dc918f1d8d14db5dac56d4b1a705fa9de2f
AP: Avoid double free of key data buffer if AES unwrap fails

key_data_buf was freed when aes_unwrap() failed, and then after goto
out, key_data_buf would be freed again. The separate feeing on
aes_unwrap() failure is not needed, so remove it.

Fixes: 4abc37e67b ("Support Key Data field decryption for EAPOL-Key msg 2/4 and 4/4")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/wpa_auth.c