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] [day] [month] [year] [list]
Message-ID: <CAEnQdOrR19H84EooKsFTMCPypeEZwR3GD7FA-sj=toxQP-Xoyg@mail.gmail.com>
Date: Thu, 24 Apr 2025 11:10:32 +0800
From: henry martin <bsdhenrymartin@...il.com>
To: peter.ujfalusi@...il.com, vkoul@...nel.org
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org, 
	nathan.lynch@....com
Subject: Re: [PATCH v1] dmaengine: ti: Add NULL check in udma_probe()

Hi Peter, Vinod,

I hope this email finds you well. I wanted to follow up on my previous patch
submission to check if there are any additional feedback or changes you'd like
me to address. If so, I’d be happy to incorporate them and send a v2.

Please let me know your thoughts. Thanks for your time and review!

Best regards,
Henry

Henry Martin <bsdhenrymartin@...il.com> 于2025年4月2日周三 10:39写道:
>
> devm_kasprintf() returns NULL when memory allocation fails. Currently,
> udma_probe() does not check for this case, which results in a NULL
> pointer dereference.
>
> Add NULL check after devm_kasprintf() to prevent this issue.
>
> Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA")
> Signed-off-by: Henry Martin <bsdhenrymartin@...il.com>
> ---
>  drivers/dma/ti/k3-udma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index 7ed1956b4642..f1c2f8170730 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -5582,7 +5582,8 @@ static int udma_probe(struct platform_device *pdev)
>                 uc->config.dir = DMA_MEM_TO_MEM;
>                 uc->name = devm_kasprintf(dev, GFP_KERNEL, "%s chan%d",
>                                           dev_name(dev), i);
> -
> +               if (!uc->name)
> +                       return -ENOMEM;
>                 vchan_init(&uc->vc, &ud->ddev);
>                 /* Use custom vchan completion handling */
>                 tasklet_setup(&uc->vc.task, udma_vchan_complete);
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ