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: <e54e4abe-d0af-4a27-63c4-e0deb855c741@quicinc.com>
Date:   Thu, 21 Apr 2022 20:35:14 -0700
From:   Abhinav Kumar <quic_abhinavk@...cinc.com>
To:     Yang Yingliang <yangyingliang@...wei.com>,
        <linux-kernel@...r.kernel.org>, <freedreno@...ts.freedesktop.org>,
        <dri-devel@...ts.freedesktop.org>, <linux-arm-msm@...r.kernel.org>
CC:     <jilaiw@...eaurora.org>
Subject: Re: [PATCH] drm/msm/hdmi: check return value after calling
 platform_get_resource_byname()



On 4/21/2022 8:22 PM, Yang Yingliang wrote:
> It will cause null-ptr-deref if platform_get_resource_byname() returns NULL,
> we need check the return value.
> 
> Fixes: c6a57a50ad56 ("drm/msm/hdmi: add hdmi hdcp support (V3)")
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@...cinc.com>
> ---
>   drivers/gpu/drm/msm/hdmi/hdmi.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
> index ec324352e862..07e2ad527af9 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c
> @@ -142,6 +142,10 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev)
>   	/* HDCP needs physical address of hdmi register */
>   	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>   		config->mmio_name);
> +	if (!res) {
> +		ret = -EINVAL;
> +		goto fail;
> +	}
>   	hdmi->mmio_phy_addr = res->start;
>   
>   	hdmi->qfprom_mmio = msm_ioremap(pdev, config->qfprom_mmio_name);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ