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: <f9df2e02-9fae-4e16-9412-d378ef168903@linaro.org>
Date:   Sat, 26 Aug 2023 12:49:27 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Zhang Shurong <zhang_shurong@...mail.com>,
        quic_schowdhu@...cinc.com
Cc:     agross@...nel.org, andersson@...nel.org,
        gregkh@...uxfoundation.org, linux-arm-msm@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: misc: eud: Fix missing IRQ check in eud_probe()

On 26.08.2023 12:47, Zhang Shurong wrote:
> This func misses checking for platform_get_irq()'s call and may passes the
> negative error codes to request_irq(), which takes unsigned IRQ #,
> causing it to fail with -EINVAL, overriding an original error code.
> 
> Fix this by stop calling request_irq() with invalid IRQ #s.
> 
> Fixes: 9a1bf58ccd44 ("usb: misc: eud: Add driver support for Embedded USB Debugger(EUD)")
> Signed-off-by: Zhang Shurong <zhang_shurong@...mail.com>
> ---
>  drivers/usb/misc/qcom_eud.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c
> index 7f371ea1248c..b33c615a2037 100644
> --- a/drivers/usb/misc/qcom_eud.c
> +++ b/drivers/usb/misc/qcom_eud.c
> @@ -204,7 +204,12 @@ static int eud_probe(struct platform_device *pdev)
>  	if (IS_ERR(chip->mode_mgr))
>  		return PTR_ERR(chip->mode_mgr);
>  
> -	chip->irq = platform_get_irq(pdev, 0);
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
> +		return ret;
> +
> +	chip->irq = ret;chip->irq = plat..
if (chip->irq < 0)
	return chip->irq

?

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ