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: <5e5d1d25-2e03-43fa-bbc6-8256f31a1000@kernel.org>
Date: Thu, 25 Dec 2025 13:08:07 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Alper Ak <alperyasinak1@...il.com>, peda@...ntia.se
Cc: Andrew Davis <afd@...com>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>,
 "Thomas Richard (TI.com)" <thomas.richard@...tlin.com>,
 Thorsten Blum <thorsten.blum@...ux.dev>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmux: mmio: fix IS_ERR() vs NULL check for
 mux_mmio_probe()

On 25/12/2025 12:41, Alper Ak wrote:
> devm_kmalloc() returns NULL on failure, not an ERR_PTR value. The
> current IS_ERR() check will never catch allocation failures, which
> could lead to NULL pointer dereference.
> 
> Signed-off-by: Alper Ak <alperyasinak1@...il.com>

Missing fixes tag.

> ---
>  drivers/mux/mmio.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c
> index e4ddb1e61923..3409af1ffb80 100644
> --- a/drivers/mux/mmio.c
> +++ b/drivers/mux/mmio.c
> @@ -101,13 +101,13 @@ static int mux_mmio_probe(struct platform_device *pdev)
>  	mux_mmio = mux_chip_priv(mux_chip);
>  
>  	mux_mmio->fields = devm_kmalloc(dev, num_fields * sizeof(*mux_mmio->fields), GFP_KERNEL);
> -	if (IS_ERR(mux_mmio->fields))
> -		return PTR_ERR(mux_mmio->fields);

I really wonder from where do the people sometimes copy code...

With missing tag:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ