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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 7 Jan 2022 14:15:19 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Michael Straube <straube.linux@...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 03/19] staging: r8188eu: release_firmware is not called if
 allocation fails

Hi Michael,

On 1/7/22 13:36, Michael Straube wrote:
> In function load_firmware() release_firmware() is not called if the
> allocation of pFirmware->szFwBuffer fails or if fw->size is greater
> than FW_8188E_SIZE.
> 
> Move the call to release_firmware() to the exit label at the end of
> the function to fix this.
> 
> Signed-off-by: Michael Straube <straube.linux@...il.com>
> ---
>   drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> index dc41682fd8d6..cfafbb6c42f7 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> @@ -538,10 +538,10 @@ static int load_firmware(struct rt_firmware *pFirmware, struct device *device)
>   	}
>   	memcpy(pFirmware->szFwBuffer, fw->data, fw->size);
>   	pFirmware->ulFwLength = fw->size;
> -	release_firmware(fw);
>   	dev_dbg(device, "!bUsedWoWLANFw, FmrmwareLen:%d+\n", pFirmware->ulFwLength);
>   
>   Exit:
> +	release_firmware(fw);
>   	return rtStatus;
>   }
>   


This patch looks like a bug fix and it should go to stable kernels as 
well. The problem is this patch is made on top of 2 previous clean up 
patches, so it can't go to stable as is.

I think, the less painful way is to move this patch on the first place 
in this series. On the other hand you can just resend this one separately.


Or, maybe, Greg knows some magic that will help here, we can wait him 
before you resend 20 patch series :)

If you will somehow resend, please, add following tag:

Fixes: 8cd574e6af54 ("staging: r8188eu: introduce new hal dir for 
RTL8188eu driver")


Thanks for you clean up work on this driver!


With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ