Home
last modified time | relevance | path

Searched hist:"3 eb0c44511ce81e239f92442cfc548b262d9956b" (Results 1 – 1 of 1) sorted by relevance

/optee_os/lib/libutee/
H A Duser_ta_entry.c3eb0c44511ce81e239f92442cfc548b262d9956b Tue Jun 24 17:52:25 UTC 2025 Johan Korsnes <johan.korsnes@remarkable.no> libutee: Fix handling of failed TA_CreateEntryPoint() in keep-alive TAs

Do not mark init as done if init fails. This is necessary to avoid
running a TA uninitialized. Also, add a new marker indicating if the
malloc pool and other runtime setup has been performed - this part
of the init must not be repeated.

This issue could cause a NULL pointer dereference in PKCS#11 TA if
the TA's init failed. F.ex., if `tee-supplicant` was unavailable, the
PKCS#11 TA's `TA_CreateEntryPoint()` would fail to init its tokens,
and an error value would be returned. This in itself is fine, but the
problem is that the init would be marked as done. Hence, for the next
session, the TA's `TA_CreateEntryPoint()` would be omitted during init.

Link: https://github.com/OP-TEE/optee_os/pull/7443
Signed-off-by: Johan Korsnes <johan.korsnes@remarkable.no>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>