Unratedcrates.ioPublished
Use After Free in Context::start_auth_session
GHSA-w3vw-ccc5-qr8v
- Affected
- crates.io tss-esapi >= 7.0.0, < 7.1.0; < 6.1.2
- Fixed in
- 6.1.27.1.0· Vendor fix available
- Issue
- Impact This issue only applies to applications starting authorization sessions using an explicit initial nonce. When Context::startauthsession was called with a nonce argument value of Some(...), the nonce pointer passed down through FFI to EsysStartAuthSession would be a dangling pointer, left over from a defunct instance of TPM2BNONCE. This could lead to an incorrect value being used as a nonce, though whether that value is controllable is unclear (so should be assumed as possible). The error became apparent due to changes in v1.61.0 of the Rust compiler. Logs indicating a failure due to this issue (with the 1.61.0 version of the Rust toolchain) look as follows: Patches The issue has been patched in versions 6 and 7 of the tss-esapi crate. Please update to 7.1.0 or 6.1.2. Workarounds There is no workaround that achieves the same functionality. References For more information on the cause of the issue and the fix, see this PR. For more details about the TPM2StartAuthSession command…
Recommended action: Upgrade to 7.1.0 or 6.1.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.