]> git.ipfire.org Git - thirdparty/hostap.git/commit
mka: Avoid memory leak in unexpected case in RECEIVE
authorJouni Malinen <jouni@codeaurora.org>
Mon, 15 Apr 2019 19:50:06 +0000 (22:50 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2019 19:50:06 +0000 (22:50 +0300)
commit0be8b9238f6ca95731f215304458d4d954a31cd8
treea420ac055c2b197139bb97dac92c8996bc70d2a9
parent984d5b7e1fdd6c23337445ed08b2bd0b65504084
mka: Avoid memory leak in unexpected case in RECEIVE

It looks like it is possible for the RECEIVE state to leak memory where
a previously allocated sm->lki is moved to sm->oki while sm->oki is
pointing to not yet freed entry. It is not clear how this can be
triggered, but it has come up in hwsim testing under heavy load.

Free sm->oki if it is still set in RECEIVE before replacing it with
sm->lki to avoid this memory leak.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/pae/ieee802_1x_cp.c