* [PATCH] tpm: fix race condition in tpm_common_write() [not found] <152701036671.19968.17347263774570787595.stgit@tstruk-mobl1.jf.intel.com> @ 2018-05-23 13:23 ` Jarkko Sakkinen 2018-05-23 17:57 ` Tadeusz Struk 0 siblings, 1 reply; 5+ messages in thread From: Jarkko Sakkinen @ 2018-05-23 13:23 UTC (permalink / raw) To: linux-security-module 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<N>, or two different applications on > the same /dev/tpmrm<N> to overwrite eachother requests/responses. > > Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Ouch o_O Do you have a fixes tag for this one? Thank you. Reviewed-by: Jarkko Sakkien <jarkko.sakkinen@linux.intel.com> /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] tpm: fix race condition in tpm_common_write() 2018-05-23 13:23 ` [PATCH] tpm: fix race condition in tpm_common_write() Jarkko Sakkinen @ 2018-05-23 17:57 ` Tadeusz Struk 2018-05-23 19:41 ` Jason Gunthorpe 2018-05-30 11:01 ` Jarkko Sakkinen 0 siblings, 2 replies; 5+ messages in thread From: Tadeusz Struk @ 2018-05-23 17:57 UTC (permalink / raw) To: linux-security-module 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.c file Then there were two other commits that moved the code around: afdba32e2a9ea (tpm: Pull everything related to /dev/tpmX into tpm-dev.c) which moved it from drivers/char/tpm/tpm-interface.c into drivers/char/tpm/tpm-dev.c and last one, ecb38e2f521b0 (tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c) which moved it from drivers/char/tpm/tpm-dev.c into tpm-common-dev.c I have no idea how to tag it. Maybe we can use: Fixes: ecb38e2f521b0 ("tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c") And then it probably needs to be back ported manually all the way back to abce9ac292e13. Thanks, -- Tadeusz -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] tpm: fix race condition in tpm_common_write() 2018-05-23 17:57 ` Tadeusz Struk @ 2018-05-23 19:41 ` Jason Gunthorpe 2018-05-30 11:01 ` Jarkko Sakkinen 2018-05-30 11:01 ` Jarkko Sakkinen 1 sibling, 1 reply; 5+ messages in thread From: Jason Gunthorpe @ 2018-05-23 19:41 UTC (permalink / raw) To: linux-security-module 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 a timeout hang) > and the code back then was in drivers/char/tpm/tpm-interface.c file No, it has been wrong since before git history started, so just use Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") All the other commits you listed are just moving the bad code around to new files. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] tpm: fix race condition in tpm_common_write() 2018-05-23 19:41 ` Jason Gunthorpe @ 2018-05-30 11:01 ` Jarkko Sakkinen 0 siblings, 0 replies; 5+ messages in thread From: Jarkko Sakkinen @ 2018-05-30 11:01 UTC (permalink / raw) To: linux-security-module 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 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.c file > > No, it has been wrong since before git history started, so just use > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > > All the other commits you listed are just moving the bad code around > to new files. > > Jason OK, thank you Jason. I'll use that. /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] tpm: fix race condition in tpm_common_write() 2018-05-23 17:57 ` Tadeusz Struk 2018-05-23 19:41 ` Jason Gunthorpe @ 2018-05-30 11:01 ` Jarkko Sakkinen 1 sibling, 0 replies; 5+ messages in thread From: Jarkko Sakkinen @ 2018-05-30 11:01 UTC (permalink / raw) To: linux-security-module 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 a timeout hang) > and the code back then was in drivers/char/tpm/tpm-interface.c file > > Then there were two other commits that moved the code around: > afdba32e2a9ea (tpm: Pull everything related to /dev/tpmX into tpm-dev.c) > which moved it from drivers/char/tpm/tpm-interface.c into drivers/char/tpm/tpm-dev.c > > and last one, ecb38e2f521b0 (tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c) > which moved it from drivers/char/tpm/tpm-dev.c into tpm-common-dev.c > > I have no idea how to tag it. Maybe we can use: > Fixes: ecb38e2f521b0 ("tpm: split out tpm-dev.c into tpm-dev.c and tpm-common-dev.c") > > And then it probably needs to be back ported manually all the way back to abce9ac292e13. > > Thanks, > -- > Tadeusz Thank you. I'll cc this to stable. /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-30 11:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <152701036671.19968.17347263774570787595.stgit@tstruk-mobl1.jf.intel.com> 2018-05-23 13:23 ` [PATCH] tpm: fix race condition in tpm_common_write() Jarkko Sakkinen 2018-05-23 17:57 ` Tadeusz Struk 2018-05-23 19:41 ` Jason Gunthorpe 2018-05-30 11:01 ` Jarkko Sakkinen 2018-05-30 11:01 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).