pmksa_cache_remove() -- endless loop?
Jouni Malinen
j at w1.fi
Tue Sep 1 14:42:38 PDT 2026
On Tue, Sep 01, 2026 at 09:09:57PM +0000, Doug Smith wrote:
> Appears to be an endless loop in pmksa_cache_remove() in <src/rsn_supp/pmksa_cache.c>:
> https://git.w1.fi/cgit/hostap/tree/src/rsn_supp/pmksa_cache.c#n66
>
> e = pmksa->pmksa;
> while (e) {
> if (e == entry) {
> pmksa->pmksa = entry->next;
> break;
> }
> if (e->next == entry) {
> e->next = entry->next;
> break;
> }
> }
>
> The loop will exit if there are no entries in the cache, or if entry is the first or second in the cache.
> If not, then the loop repeats forever as e is never updated.
Thanks for reporting this. I have no idea what I was thinking when
writing that.. Anyway, fixed now in hostap.git.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list