Skip to content

memcmp() may read unitiliazed memory in tests #623

@real-or-random

Description

@real-or-random

If len_der != len_der_lax, then we may read uninitialized memory here:

ret |= (memcmp(roundtrip_der_lax, roundtrip_der, len_der) != 0) << 14;

This should probably be handled similar to

roundtrips_der_lax = (len_der_lax == siglen) && memcmp(roundtrip_der_lax, sig, siglen) == 0;

Same issues further below for the OpenSSL roundtrip.

Loosely related to #532 but I agree that #532 is not a good idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions