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]
Date:   Tue, 14 Apr 2020 13:26:37 -0700
From:   Jerry Snitselaar <jsnitsel@...hat.com>
To:     Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Cc:     peterhuewe@....de, jarkko.sakkinen@...ux.intel.com, jgg@...pe.ca,
        arnd@...db.de, gregkh@...uxfoundation.org,
        zhang.jia@...ux.alibaba.com, linux-integrity@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tpm: fix wrong return value in tpm_pcr_extend

On Tue Apr 14 20, Tianjia Zhang wrote:
>For the algorithm that does not match the bank, a positive
>value EINVAL is returned here. I think this is a typo error.
>It is necessary to return an error value.
>
>Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>

Reviewed-by: Jerry Snitselaar <jsnitsel@...hat.com>

>---
> drivers/char/tpm/tpm-interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
>index a438b1206fcb..1621ce818705 100644
>--- a/drivers/char/tpm/tpm-interface.c
>+++ b/drivers/char/tpm/tpm-interface.c
>@@ -323,7 +323,7 @@ int tpm_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
>
> 	for (i = 0; i < chip->nr_allocated_banks; i++) {
> 		if (digests[i].alg_id != chip->allocated_banks[i].alg_id) {
>-			rc = EINVAL;
>+			rc = -EINVAL;
> 			goto out;
> 		}
> 	}
>-- 
>2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ