Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAPI: Fix error handling in state machines #2753

Conversation

JuergenReppSIT
Copy link
Member

@JuergenReppSIT JuergenReppSIT commented Jan 19, 2024

  • In some sub state machines, which had no async function, the state was not reset to the initial state in error cases.
  • In some FAPI commands in the async part it was not checked whether the command is state is equal _FAPI_STATE_INIT.
  • In several FAPI commands the current state of the FAPI context was not reset to _FAPI_STATE_INIT in error cases.
    Thus it was possible that a sequence error did occur after a normal error case.

Fixes: #2752

* In some sub state machines, which had no async function, the
  state was not reset to the initial state in error cases.
* In some FAPI commands in the async part it was not checked
  whether the command is state is equal _FAPI_STATE_INIT.
* In several FAPI commands the current state of the FAPI
  context was not reset to _FAPI_STATE_INIT in error cases.
  Thus it was possible that a sequence error did occur after
  a normal error case.

Fixes: tpm2-software#2752

Signed-off-by: Juergen Repp <[email protected]>
@JuergenReppSIT JuergenReppSIT force-pushed the fapi-fix-sub-state-machines branch from 0e8fb9f to 1eab909 Compare January 21, 2024 12:42
@JuergenReppSIT JuergenReppSIT changed the title FAPI: Fix error checking of state machines FAPI: Fix error handling in state machines Jan 21, 2024
@JuergenReppSIT JuergenReppSIT force-pushed the fapi-fix-sub-state-machines branch from c8c787e to 1eab909 Compare January 23, 2024 10:31
The FAPI command context now is cleared in the async function of
every command.

Signed-off-by: Juergen Repp <[email protected]>
@AndreasFuchsTPM AndreasFuchsTPM merged commit 84ead1b into tpm2-software:master Jan 24, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FApi terminates with SIGSEGV when signing with non existing key
2 participants