]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/ap/drv_callbacks.c
Fix AP MLME in driver handling of FT and SA Query Action frames
authorJouni Malinen <j@w1.fi>
Sat, 9 Mar 2019 10:21:27 +0000 (12:21 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 9 Mar 2019 10:41:43 +0000 (12:41 +0200)
commit002edb6303c5a3f8a21cc2373d21a340c9c5328d
treee60ac90b5fdc1810927024d6df009208754835e4
parent0defc42a49a3c92954c2cf7bc08bdd86de9f835e
Fix AP MLME in driver handling of FT and SA Query Action frames

hostapd_action_rx() was pointing at incorrect field (Action vs.
Category) for the wpa_ft_action_rx() call and the length check for SA
Query Action frames. This resulted in those frames getting dropped as
invalid (FT) or ignored as truncated (SA Query). Fix this by pointing to
the correct place at the beginning of the frame body.

This issue had a long history. These were broken during cleanup in
commit dbfb8e82ff69 ("Remove unnecessary EVENT_RX_ACTION") which
actually fixed the initial reason for the error accidentally. It was
just that that error was needed to cancel out another earlier error..

One of the errors came from misuse of the EVENT_RX_ACTION API in commit
deca6eff7441 ("atheros: Add new IEEE 802.11r driver_ops"). That pointed
struct rx_action data/len to cover the Action frame from the Category
field to the end of the frame body while the API was documented to cover
Action field to the end of the frame body. This error was cancelled by
another error in commit 88b32a99d308 ("FT: Add FT AP support for drivers
that manage MLME internally") that called wpa_ft_action_rx() with the
struct rx_action::data field as the second argument. That argument needs
to point to the Category field, but that struct rx_action field was
supposed to point to the Action field.

Number of the Action frame handlers added into hostapd_action_rx() had
been fixed more or less accidentally after this in various other
commits, but the FT and SA Query handlers had ended up maintaining the
incorrect operations. This is now fixing those.

This seems to fix at least some cases of FT-over-DS with drivers that
use driver-based AP MLME. Such drivers might use internal SA Query
processing, so it is not clear whether that part actually fixes any real
issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/drv_callbacks.c