Re: [PATCH] HE: Consider the dynamic length of the mcs_nss and ppet fields of HE Capability IE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, 25 June 2019 15:28:43 CEST Shay Bar wrote:
> he_capab_len is always greater than sizeof(struct ieee80211_he_capabilities) because of the dynamic mcs_nss and ppet fields.
> Thus, the validity check in copy_sta_he_capab will always fail and he_capab will never be parsed.
> Fix is to validate that he_capab_len is not greater than the maximum HE Capability IE size and use the actual he_capab_len to parse the he_capab.
> Also, take these fields into consideration in beacon.c
> 
> Signed-off-by: shay.bar <shay.bar@xxxxxxxxxx>

Your Signed-off-by name isn't equal to the author name (see "From: ") of this 
patch.

And at least in many projects (cannot say for sure for hostapd since it seems 
to deal quite differently with some stuff), it is helpful to have the version 
number of the submission in the prefix. You can generate the patches with a 
version number using -v 2 (for version 2). Here an example:

   git format-patch -v 2 -1

This is rather helpful when you create the summary of changes for this patch 
since the first version.

> ---
> Now including the Signed-off-by :)

What the heck are you using to send these mails? The header seems to suggest 
that you are using git-send-email to send them out but the result [1] looks 
like nothing which patch or git-am can parse. Is your company filtering 
outgoing mails to death?

    $ git am ~/Downloads/HE-Consider-the-dynamic-length-of-the-mcs_nss-and-ppet-fields-of-HE-Capability-IE.patch 
    Applying: HE: Consider the dynamic length of the mcs_nss and ppet fields of HE Capability IE
    error: patch failed: src/ap/beacon.c:397
    error: src/ap/beacon.c: patch does not apply
    error: patch failed: src/ap/ieee802_11_he.c:323
    error: src/ap/ieee802_11_he.c: patch does not apply
    Patch failed at 0001 HE: Consider the dynamic length of the mcs_nss and ppet fields of HE Capability IE
    hint: Use 'git am --show-current-patch' to see the failed patch
    When you have resolved this problem, run "git am --continue".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".

    $ patch -p1 -i ~/Downloads/HE-Consider-the-dynamic-length-of-the-mcs_nss-and-ppet-fields-of-HE-Capability-IE.patch
    patching file src/ap/beacon.c
    Hunk #1 FAILED at 397.
    Hunk #2 FAILED at 1089.
    2 out of 2 hunks FAILED -- saving rejects to file src/ap/beacon.c.rej
    patching file src/ap/ieee802_11_he.c
    Hunk #1 FAILED at 323.
    Hunk #2 FAILED at 333.
    2 out of 2 hunks FAILED -- saving rejects to file src/ap/ieee802_11_he.c.rej

[...]
> @@ -333,14 +336,13 @@ u16 copy_sta_he_capab(struct hostapd_data *hapd, struct sta_info *sta,
>  }
> 
>  if (!sta->he_capab) {
> -sta->he_capab =
> -os_zalloc(sizeof(struct ieee80211_he_capabilities));
> +sta->he_capab =os_zalloc(he_capab_len);
>  if (!sta->he_capab)
>  return WLAN_STATUS_UNSPECIFIED_FAILURE;
>  }
> 
>  sta->flags |= WLAN_STA_HE;
> -os_memset(sta->he_capab, 0, sizeof(struct ieee80211_he_capabilities));
> +os_memset(sta->he_capab, 0, he_capab_len);
>  os_memcpy(sta->he_capab, he_capab, he_capab_len);
>  sta->he_capab_len = he_capab_len;

Please see https://patchwork.ozlabs.org/patch/1109462/

> ________________________________
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
> ________________________________

This is wrong in so many ways.

Kind regards,
	Sven

[1] https://patchwork.ozlabs.org/patch/1122057/

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux