You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2023. It is now read-only.
Using XMC2Go and the latest OPTIGA Trust X library, assert (shown in italic) is added and triggered. The bTagLocation variable returns from IntLib_GetTagPos() can be a value larger than the available array size causing the system to crash.
static int32_t IntLib_VerifyAC(eMetaDataTag_d PeMetaDataTag, sACVector_d *PpsACVal)
{.....
//get tag position of lcsO and read lcsO.
//LCO may not be found for all object.It is not an error
i4Status = IntLib_GetTagPos(PpsACVal->psMetaData->prgbStream,(uint8_t)eLCSO,&bTagLocation);
if(INT_LIB_OK == i4Status)
{ if(LENGTH_METADATA<=(bTagLocation+2)){
i4Status = (int32_t)INT_LIB_ERROR;
Serial.println("Assert: Array out of bound!");
Serial.println(bTagLocation,HEX);
break;
}
//get the LcsO value from TLV
PpsACVal->bLcsO = (PpsACVal->psMetaData->prgbStream)[bTagLocation+2];
.......
The text was updated successfully, but these errors were encountered:
Using XMC2Go and the latest OPTIGA Trust X library, assert (shown in italic) is added and triggered. The bTagLocation variable returns from IntLib_GetTagPos() can be a value larger than the available array size causing the system to crash.
static int32_t IntLib_VerifyAC(eMetaDataTag_d PeMetaDataTag, sACVector_d *PpsACVal)
{.....
//get tag position of lcsO and read lcsO.
//LCO may not be found for all object.It is not an error
i4Status = IntLib_GetTagPos(PpsACVal->psMetaData->prgbStream,(uint8_t)eLCSO,&bTagLocation);
if(INT_LIB_OK == i4Status)
{
if(LENGTH_METADATA<=(bTagLocation+2)){
i4Status = (int32_t)INT_LIB_ERROR;
Serial.println("Assert: Array out of bound!");
Serial.println(bTagLocation,HEX);
break;
}
//get the LcsO value from TLV
PpsACVal->bLcsO = (PpsACVal->psMetaData->prgbStream)[bTagLocation+2];
.......
The text was updated successfully, but these errors were encountered: