Re: Bad usercopy from tpm after d23d12484307 ("tpm: fix invalid locking in NONBLOCKING mode")

From: Tadeusz Struk
Date: Tue Jan 07 2020 - 15:27:39 EST


On 1/7/20 10:51 AM, Laura Abbott wrote:
> I think this is related to d23d12484307 ("tpm: fix invalid locking in
> NONBLOCKING mode")
> Specifically, if tpm_try_get_ops fails I don't think we should be
> putting the error
> code in priv->response_length since tpm_common_read doesn't seem to
> account for
> negative errno values.
>
> I don't have a reproducer since this was just what was reported to
> Fedora's bug
> reporter but both reports happened after that commit landed in stable.

Thank you for the report Laura. Fix is on the way.

--
Tadeusz