Files
twx-linux/drivers
Zhen Lei f9361d826c tpm: fix error return code in tpm2_get_cc_attrs_tbl()
commit 1df83992d9 upstream.

If the total number of commands queried through TPM2_CAP_COMMANDS is
different from that queried through TPM2_CC_GET_CAPABILITY, it indicates
an unknown error. In this case, an appropriate error code -EFAULT should
be returned. However, we currently do not explicitly assign this error
code to 'rc'. As a result, 0 was incorrectly returned.

Cc: stable@vger.kernel.org
Fixes: 58472f5cd4f6("tpm: validate TPM 2.0 commands")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-22 10:59:39 +02:00
..
2021-05-22 10:59:33 +02:00
…
…
…
…
…
…
…
…
…
2021-04-28 13:16:48 +02:00
2021-05-22 10:59:37 +02:00
…
2021-04-10 13:21:18 +02:00
2021-01-17 14:04:22 +01:00
…
…
…
…
…
…
2020-12-30 11:26:04 +01:00
…
…
2021-03-04 09:39:44 +01:00
…
…
…
…
…
…
…
…
…
…
2021-04-07 12:48:48 +02:00
…
…
…
2021-04-16 11:49:31 +02:00
…
…