I think there is a problem with the cleanup of transport sessions, but I
am having a problem isolating it.
Whenever I run the test that establishes a transport session, when the
test completes there are 1 fewer Sessions available in the TPM. It appears
that the session data is not being flushed correctly.
At the end of the obj_context_transport_close function, all of the "trans*"
structures in the context are cleared out with memset. Later, when
"obj_context_close"
is called, the "transAuth.AuthHandle" is always 0 so the "RPC_FlushSpecific"
call never happens and the transAuth session never gets closed.
Or so I thought. I disabled the clearing of the transAuth stuff in
obj_context_transport_close so that the RPC_FlushSpecific call would
happen in obj_context_close, but that call results in an "Invalid
authorization handle"
error and the TPM still decrements the available auth session counter by 1,
so obviously that is not the right fix.
Has anyone else encountered problems with the transport auth sessions
leaking?
Once the TPM exhausts its limit of session handles (20 on my Infineon),
it has
to be rebooted in order to reset them, which is kind of inconvenient.
Any help or pointers with this would be greatly appreciated.
-Wyllys
|