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]
Message-ID: <9c425d8c-65d4-4430-a45c-d185806b826d@loongson.cn>
Date: Tue, 8 Jul 2025 09:15:38 +0800
From: Binbin Zhou <zhoubinbin@...ngson.cn>
To: Sergio Perez Gonzalez <sperezglz@...il.com>, ulf.hansson@...aro.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: loongson2: prevent integer overflow in ret variable

Hi Sergio:

Thanks for your patch.

在 2025/7/8 02:55, Sergio Perez Gonzalez 写道:
> In loongson2_mmc_dll_mode_init(), `ret` variable is declared
> as u32 but it is expected to hold an int value.
>
> Fixes: d0f8e961deae ("mc: loongson2: Add Loongson-2K2000 SD/SDIO/eMMC controller driver")
> Reported-by: https://scan7.scan.coverity.com/#/project-view/53936/11354?selectedIssue=1644958
>
> Signed-off-by: Sergio Perez Gonzalez <sperezglz@...il.com>

Reviewed-by: Binbin Zhou <zhoubinbin@...ngson.cn>

> ---
>   drivers/mmc/host/loongson2-mmc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/loongson2-mmc.c b/drivers/mmc/host/loongson2-mmc.c
> index 515ccf834f0a..ba6bb8fd5535 100644
> --- a/drivers/mmc/host/loongson2-mmc.c
> +++ b/drivers/mmc/host/loongson2-mmc.c
> @@ -485,7 +485,8 @@ static irqreturn_t loongson2_mmc_irq(int irq, void *devid)
>   
>   static void loongson2_mmc_dll_mode_init(struct loongson2_mmc_host *host)
>   {
> -	u32 val, pad_delay, delay, ret;
> +	u32 val, pad_delay, delay;
> +	int ret;
>   
>   	regmap_update_bits(host->regmap, LOONGSON2_MMC_REG_SEL,
>   			   LOONGSON2_MMC_SEL_DATA, LOONGSON2_MMC_SEL_DATA);
Thanks.
Binbin


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ