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: <CAHUa44H4XHOxn_=TxTUM=S6oqUNL6-kVVU2=jFPZyobzmtbQPg@mail.gmail.com>
Date: Thu, 5 Sep 2024 16:08:54 +0200
From: Jens Wiklander <jens.wiklander@...aro.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Sumit Garg <sumit.garg@...aro.org>, Ulf Hansson <ulf.hansson@...aro.org>, 
	op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] optee: Fix a NULL vs IS_ERR() check

On Thu, Sep 5, 2024 at 3:17 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> The tee_shm_get_va() function never returns NULL, it returns error
> pointers.  Update the check to match.
>
> Fixes: f0c8431568ee ("optee: probe RPMB device using RPMB subsystem")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/tee/optee/rpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
> index a4b49fd1d46d..ebbbd42b0e3e 100644
> --- a/drivers/tee/optee/rpc.c
> +++ b/drivers/tee/optee/rpc.c
> @@ -332,7 +332,7 @@ static void handle_rpc_func_rpmb_probe_next(struct tee_context *ctx,
>         }
>         buf = tee_shm_get_va(params[1].u.memref.shm,
>                              params[1].u.memref.shm_offs);
> -       if (!buf) {
> +       if (IS_ERR(buf)) {
>                 arg->ret = TEEC_ERROR_BAD_PARAMETERS;
>                 return;
>         }
> --
> 2.45.2
>

Good catch.
Reviewed-by: Jens Wiklander <jens.wiklander@...aro.org>

Ulf, this is a fix for a patch in your next tree so if you could pick
up this patch, please.

Thanks,
Jens

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ