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: <DGBC3ZA7383J.2TB8U10NOWDLC@linaro.com>
Date: Tue, 10 Feb 2026 14:00:09 +0000
From: Rui Miguel Silva <rui.silva@...aro.org>
To: "Sergey Shtylyov" <sergei.shtylyov@...il.com>, "Chen Ni"
 <nichen@...as.ac.cn>, <rui.silva@...aro.org>, <gregkh@...uxfoundation.org>,
 <laurent.pinchart@...asonboard.com>, <balbi@...com>
Cc: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: isp1760: Add missing error check for
 platform_get_resource()

Hi,
On Tue Feb 10, 2026 at 1:45 PM WET, Sergey Shtylyov wrote:

> On 2/10/26 12:02 PM, Chen Ni wrote:
>
>> Check the return value of platform_get_resource() to prevent potential
>> NULL pointer dereference when the memory resource is unavailable.
>> 
>> Fixes: 7ef077a8ad35 ("usb: isp1760: Move driver from drivers/usb/host/ to drivers/usb/isp1760/")
>> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
>> ---
>>  drivers/usb/isp1760/isp1760-if.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/drivers/usb/isp1760/isp1760-if.c b/drivers/usb/isp1760/isp1760-if.c
>> index a64190addba6..60f81ec81373 100644
>> --- a/drivers/usb/isp1760/isp1760-if.c
>> +++ b/drivers/usb/isp1760/isp1760-if.c
>> @@ -196,6 +196,8 @@ static int isp1760_plat_probe(struct platform_device *pdev)
>>  	int ret;
>>  
>>  	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> +	if (!mem_res)
>> +		return -EINVAL;
>
>    Isn't it already checked in __devm_ioremap_resource(), called later on?

Yes, agree, I do not see where the pointer could be NULL dereferenced.
It is validated in devm_ioremap_resource, and the same error propagated.

Cheers,
    Rui

>
> [...]
>
> MBR, Sergey




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ