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: <b7200998-c8e7-0841-ce91-ad3834c63cae@ti.com>
Date:   Tue, 7 Jan 2020 13:59:58 +0200
From:   Peter Ujfalusi <peter.ujfalusi@...com>
To:     Colin King <colin.king@...onical.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Vinod Koul <vkoul@...nel.org>,
        Tony Lindgren <tony@...mide.com>, <dmaengine@...r.kernel.org>
CC:     <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] dmaengine: ti: omap-dma: don't allow a null
 od->plat pointer to be dereferenced

Colin,

On 06/01/2020 14.23, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently when the call to dev_get_platdata returns null the driver issues
> a warning and then later dereferences the null pointer.  Avoid this issue
> by returning -EPROBE_DEFER errror rather when the platform data is null.

Thank you for noticing it!

Acked-by: Peter Ujfalusi <peter.ujfalusi@...com>

> Addresses-Coverity: ("Dereference after null check")
> Fixes: 211010aeb097 ("dmaengine: ti: omap-dma: Pass sdma auxdata to driver and use it")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/dma/ti/omap-dma.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
> index fc8f7b2fc7b3..335c3fa7a3b1 100644
> --- a/drivers/dma/ti/omap-dma.c
> +++ b/drivers/dma/ti/omap-dma.c
> @@ -1658,8 +1658,10 @@ static int omap_dma_probe(struct platform_device *pdev)
>  	if (conf) {
>  		od->cfg = conf;
>  		od->plat = dev_get_platdata(&pdev->dev);
> -		if (!od->plat)
> +		if (!od->plat) {
>  			dev_warn(&pdev->dev, "no sdma auxdata needed?\n");
> +			return -EPROBE_DEFER;
> +		}
>  	} else {
>  		od->cfg = &default_cfg;
>  
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ