{"answers":{"affected":"4 open source packages ship an affected version, including tss-esapi.","exploited":"There is no known exploitation of GHSA-w3vw-ccc5-qr8v in the wild and no public exploit code.","fix":"Upgrade tss-esapi to a fixed version for your release line: 6.1.2 or 7.1.0.","what":"GHSA-w3vw-ccc5-qr8v is an use after free vulnerability in tss-esapi, published on 17 Jun 2022."},"fix_prompt":"Check this codebase for GHSA-w3vw-ccc5-qr8v and fix it if it is affected.\n\nWhat it is: GHSA-w3vw-ccc5-qr8v is an use after free vulnerability in tss-esapi, published on 17 Jun 2022. \nExploitation: There is no known exploitation of GHSA-w3vw-ccc5-qr8v in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tss-esapi (crates.io): affected all versions; fixed in 6.1.2\n- tss-esapi (crates.io): affected all versions; fixed in 6.1.2\n- tss-esapi (crates.io): affected from 7.0.0; fixed in 7.1.0\n- tss-esapi (crates.io): affected from 7.0.0; fixed in 7.1.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-w3vw-ccc5-qr8v/ (Markdown: https://insights.sbomify.com/GHSA-w3vw-ccc5-qr8v/index.md)","id":"GHSA-w3vw-ccc5-qr8v","markdown":"https://insights.sbomify.com/GHSA-w3vw-ccc5-qr8v/index.md","name":"GHSA-w3vw-ccc5-qr8v","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["other"],"network_reachable":"unknown","non_default_config":true,"product_category":"Rust TPM library","requires_auth":"none","summary":"A use-after-free bug in the tss-esapi Rust library can cause incorrect nonce values during authorization sessions, potentially leading to security bypasses or errors.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\n**This issue only applies to applications starting authorization sessions using an explicit initial `nonce`.**\n\nWhen [`Context::start_auth_session`](https://docs.rs/tss-esapi/7.0.1/tss_esapi/struct.Context.html#method.start_auth_session) was called with a `nonce` argument value of `Some(...)`, the nonce pointer passed down through FFI to `Esys_StartAuthSession` would be a dangling pointer, left over from a defunct instance of `TPM2B_NONCE`. 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.\n\nLogs indicating a failure due to this issue (with the 1.61.0 version of the Rust toolchain) look as follows:\n```\n2022-05-24T01:04:41.9131341Z WARNING:esys:src/tss2-esys/api/Esys_StartAuthSession.c:390:Esys_StartAuthSession_Finish() Received TPM Error \n2022-05-24T01:04:41.9132192Z ERROR:esys:src/tss2-esys/api/Esys_StartAuthSession.c:136:Esys_StartAuthSession() Esys Finish ErrorCode (0x000001d5) \n2022-05-24T01:04:41.9145124Z [2022-05-24T01:04:41Z ERROR tss_esapi::context::tpm_commands::session_commands] Error when creating a session: structure is the wrong size (associated with parameter number 1)\n2022-05-24T01:04:41.9153816Z thread 'main' panicked at 'Call to start_auth_session failed: Tss2Error(FormatOne(FormatOneResponseCode { .0: 469, error_number: 21, parameter: true, format_selector: true, number: 1 }))', tss-esapi/tests/integration_tests/context_tests/tpm_commands/enhanced_authorization_ea_commands_tests.rs:870:14\n```\n\n### Patches\nThe issue has been patched in versions 6 and 7 of the `tss-esapi` crate. Please update to `7.1.0` or `6.1.2`.\n\n### Workarounds\nThere is no workaround that achieves the same functionality.\n\n### References\nFor more information on the cause of the issue and the fix, see [this](https://github.com/parallaxsecond/rust-tss-esapi/pull/344) PR.\n\nFor more details about the `TPM2_StartAuthSession` command see section 11.1 of [the TPM spec, part 3](https://trustedcomputinggroup.org/wp-content/uploads/TCG_TPM2_r1p59_Part3_Commands_pub.pdf), and section 19.6.3 of [part 1 of the same spec](https://trustedcomputinggroup.org/wp-content/uploads/TCG_TPM2_r1p59_Part1_Architecture_pub.pdf) for more information regarding session nonces.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue or discussion in [our repo](https://github.com/parallaxsecond/rust-tss-esapi)\n* Get in touch on [our Slack channel](https://github.com/parallaxsecond/community#community-channel)","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Use After Free in Context::start_auth_session","id":"GHSA-w3vw-ccc5-qr8v","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"use_after_free","year":"2022"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["6.1.2"],"introduced":["0"],"last_affected":[],"package":"tss-esapi","purl":null,"source":"GHSA-w3vw-ccc5-qr8v"},{"ecosystem":"crates.io","fixed":["6.1.2"],"introduced":["0"],"last_affected":[],"package":"tss-esapi","purl":"pkg:cargo/tss-esapi","source":"GHSA-w3vw-ccc5-qr8v"},{"ecosystem":"crates.io","fixed":["7.1.0"],"introduced":["7.0.0"],"last_affected":[],"package":"tss-esapi","purl":null,"source":"GHSA-w3vw-ccc5-qr8v"},{"ecosystem":"crates.io","fixed":["7.1.0"],"introduced":["7.0.0"],"last_affected":[],"package":"tss-esapi","purl":"pkg:cargo/tss-esapi","source":"GHSA-w3vw-ccc5-qr8v"}],"products":null,"published":"2022-06-17","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A use-after-free bug in the tss-esapi Rust library can cause incorrect nonce values during authorization sessions, potentially leading to security bypasses or errors.","url":"https://insights.sbomify.com/GHSA-w3vw-ccc5-qr8v/"}