While developing an example application to write Pelion certificates to TF-M secure storage (SST), I found out that SST implementation allows writing (SST_NUM_ASSETS + 1)th element which is reserved to support updating existing assets. If application writes (SST_NUM_ASSETS + 1) assets to SST then after that updating an existing asset fails due to insufficient space (unable to allocate new file handle).
The space for (SST_NUM_ASSETS + 1)th asset is crucial for SST implementation and should be protected. IMHO, insufficient space error should be returned when application tries to write (SST_NUM_ASSETS + 1)th asset.