[PATCH 02/58] NAN_DE: Fix SSI parsing in SDA (move to start)
Jouni Malinen
j at w1.fi
Tue Feb 24 01:58:47 PST 2026
On Thu, Feb 19, 2026 at 10:24:18PM +0200, Andrei Otcheretianski wrote:
> Service Specific Information (SSI) inside SDA attribute is not required
> to have WFA OUI header. The specification allows any data in SSI field.
> Service protocol type and OUI WFA header are mandatory only for SSI
> field inside SDEA attributes.
> Fix the parsing accordingly.
> diff --git a/src/common/nan_de.c b/src/common/nan_de.c
> @@ -1438,14 +1438,13 @@ static void nan_de_rx_sda(struct nan_de *de, const u8 *peer_addr, const u8 *a3,
> if (end - sda < 1)
> return;
> flen = *sda++;
> +
> if (end - sda < flen)
> return;
> - if (flen >= 4 && WPA_GET_BE24(sda) == OUI_WFA) {
> - srv_proto_type = sda[3];
> - ssi = sda + 4;
> - ssi_len = flen - 4;
> - wpa_printf(MSG_DEBUG, "NAN: Service Protocol Type %d",
> - srv_proto_type);
> +
> + if (flen) {
> + ssi = sda;
> + ssi_len = flen;
> wpa_hexdump(MSG_MSGDUMP, "NAN: ssi", ssi, ssi_len);
> }
Couldn't this break any existing user that expected SSI that is sent to
upper layer processing to contain data that is only after the OUI
header? This would also result in the Service Protocol Type value that
is sent in those calls to use the reserved value 0. Could that be an
issue for upper layer processing as well?
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list