Skip to content

Zynq: Use after free in DisplayAuthenicationCertificates #43

@kylex2

Description

@kylex2

The header authentication certificate is pushed into aCs, then freed before it is displayed.

/* Authentication Certificates Extraction */
uint8_t* header_ac = NULL;
if (iHT->headerAuthCertificateWordOffset != 0)
{
header_ac = new uint8_t[sizeof(AuthCertificate2048Structure)];
if (!(fseek(binFile, 4 * (iHT->headerAuthCertificateWordOffset), SEEK_SET)))
{
result = fread(header_ac, 1, sizeof(AuthCertificate2048Structure), binFile);
if (result != sizeof(AuthCertificate2048Structure))
{
LOG_ERROR("Error reading header authentication certificate");
}
}
}
aCs.push_back(header_ac);

if (header_ac != NULL)
{
delete[] header_ac;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions