lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 21 Apr 2020 21:01:02 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Denis Straghkov <d.straghkov@...ras.ru>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8723bs: rtw_wlan_util: Add size check of
 SSID IE

On Tue, Apr 21, 2020 at 08:08:06PM +0300, Denis Straghkov wrote:
>  	/* checking SSID */
> +	ssid_len = 0;
>  	p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
> -	if (!p) {
> -		DBG_871X("%s marc: cannot find SSID for survey event\n", __func__);
> -		hidden_ssid = true;
> -	} else {
> -		hidden_ssid = false;
> -	}
> -
> -	if ((NULL != p) && (false == hidden_ssid && (*(p + 1)))) {
> -		memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
> -		bssid->Ssid.SsidLength = *(p + 1);
> -	} else {
> -		bssid->Ssid.SsidLength = 0;
> -		bssid->Ssid.Ssid[0] = '\0';
> -	}
> +        if (p) {
> +                ssid_len = *(p + 1);
> +                if (ssid_len > NDIS_802_11_LENGTH_SSID)
> +                        ssid_len = 0;
> +        }
> +        memcpy(bssid->Ssid.Ssid, (p + 2), ssid_len);
> +        bssid->Ssid.SsidLength = ssid_len;

This is using spaces instead of tabs.  Please run ./scripts/checkpatch.pl
on your patch.

regargs,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ