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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3b77aa4-e7a4-475f-a633-48aab59fa9b1@kernel.org>
Date: Mon, 14 Apr 2025 10:08:18 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Johan Hovold <johan@...nel.org>
Cc: Chenyuan Yang <chenyuan0y@...il.com>, vkoul@...nel.org,
 kishon@...nel.org, lumag@...nel.org, quic_kriskura@...cinc.com,
 manivannan.sadhasivam@...aro.org, konrad.dybcio@....qualcomm.com,
 quic_varada@...cinc.com, quic_kbajaj@...cinc.com, johan+linaro@...nel.org,
 linux-arm-msm@...r.kernel.org, linux-phy@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] phy: qcom-qmp-usb: Fix an NULL vs IS_ERR() bug

On 14/04/2025 09:40, Johan Hovold wrote:
> On Mon, Apr 14, 2025 at 09:30:19AM +0200, Krzysztof Kozlowski wrote:
>> On 13/04/2025 23:25, Chenyuan Yang wrote:
>>> In qmp_usb_iomap(), one branch returns the result of devm_ioremap(), which
>>> can be NULL. Since IS_ERR() does not catch a NULL pointer,
>>
>> No, that's not true. NAK.
> 
> I'm afraid you're mistaken here. See __devm_ioremap() which can return
> NULL.
> 
Uh, you are right, I only checked devm_of_iomap in qmp_usb_iomap().
Anyway, the fix should be different - given function should either
return ERR or NULL, not both, so devm_ioremap return value needs to be
wrapped in ERR_PTR.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ