Re: [PATCH] tpm: fix race condition in tpm_common_write()

2018-05-30 Thread Jarkko Sakkinen
On Wed, May 23, 2018 at 01:41:15PM -0600, Jason Gunthorpe wrote: > On Wed, May 23, 2018 at 10:57:07AM -0700, Tadeusz Struk wrote: > > On 05/23/2018 06:23 AM, Jarkko Sakkinen wrote: > > > Ouch o_O Do you have a fixes tag for this one? > > > > > > > This one is quite tricky. > > The original bug wa

Re: [PATCH] tpm: fix race condition in tpm_common_write()

2018-05-30 Thread Jarkko Sakkinen
On Wed, May 23, 2018 at 10:57:07AM -0700, Tadeusz Struk wrote: > On 05/23/2018 06:23 AM, Jarkko Sakkinen wrote: > > Ouch o_O Do you have a fixes tag for this one? > > > > This one is quite tricky. > The original bug was introduced by abce9ac292e13 (tpm: Propagate error from > tpm_transmit to fix

Re: [PATCH] tpm: fix race condition in tpm_common_write()

2018-05-23 Thread Jason Gunthorpe
On Wed, May 23, 2018 at 10:57:07AM -0700, Tadeusz Struk wrote: > On 05/23/2018 06:23 AM, Jarkko Sakkinen wrote: > > Ouch o_O Do you have a fixes tag for this one? > > > > This one is quite tricky. > The original bug was introduced by abce9ac292e13 (tpm: Propagate error from > tpm_transmit to fix

Re: [PATCH] tpm: fix race condition in tpm_common_write()

2018-05-23 Thread Tadeusz Struk
On 05/23/2018 06:23 AM, Jarkko Sakkinen wrote: > Ouch o_O Do you have a fixes tag for this one? > This one is quite tricky. The original bug was introduced by abce9ac292e13 (tpm: Propagate error from tpm_transmit to fix a timeout hang) and the code back then was in drivers/char/tpm/tpm-interface

Re: [PATCH] tpm: fix race condition in tpm_common_write()

2018-05-23 Thread Jarkko Sakkinen
On Tue, May 22, 2018 at 10:32:46AM -0700, Tadeusz Struk wrote: > There is a race condition in tpm_common_write function allowing two > threads on the same /dev/tpm, or two different applications on > the same /dev/tpmrm to overwrite eachother requests/responses. > > Signed-off-by: Tadeusz Struk