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]
Message-ID: <f10217f8-d93d-1a9c-9746-6788cc1b8026@gmail.com>
Date:   Sat, 21 Aug 2021 10:41:32 +0200
From:   Michael Straube <straube.linux@...il.com>
To:     Xiangyang Zhang <xyz.sun.ok@...il.com>, gregkh@...uxfoundation.org
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Fix a resource leak in
 update_bcn_wps_ie

On 8/21/21 10:18 AM, Xiangyang Zhang wrote:
> The "pbackup_remainder_ie" variable is not freed when "pwps_ie_src" is null
> 
> Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
> Signed-off-by: Xiangyang Zhang <xyz.sun.ok@...il.com>
> ---
>   drivers/staging/r8188eu/core/rtw_ap.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
> index 1127e9a52458..2ce982390c7b 100644
> --- a/drivers/staging/r8188eu/core/rtw_ap.c
> +++ b/drivers/staging/r8188eu/core/rtw_ap.c
> @@ -1300,7 +1300,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
>   
>   	pwps_ie_src = pmlmepriv->wps_beacon_ie;
>   	if (!pwps_ie_src)
> -		return;
> +		goto exit;
>   
>   	wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
>   	if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
> @@ -1314,6 +1314,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
>   		pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen;
>   	}
>   
> +exit:
>   	kfree(pbackup_remainder_ie);
>   }
>   
> 

Looks good to me.

Acked-by: Michael Straube <straube.linux@...il.com>


Thanks,

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ