In Library Model, the token_size argument in secure function psa_initial_attest_get_token() is not updated with actual length of generated token. It still keeps the original value which is the token buffer size.
It was fixed by https://developer.trustedfirmware.org/T608.