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: <3452e5b6-a2f0-43a1-9f9b-a9c4ac083571@gmail.com>
Date: Thu, 1 May 2025 13:37:48 +0300
From: Péter Ujfalusi <peter.ujfalusi@...il.com>
To: henry martin <bsdhenrymartin@...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,

On 4/24/25 6:10 AM, henry martin wrote:
> 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.

For some reason I don't have the original patch in my mailbox, but looks
good, thank you.

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

Acked-by: Peter Ujfalusi <peter.ujfalusi@...il.com>
> 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
>>

-- 
Péter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ