Skip to content

X509Extension has a memory leak in its private member function _subjectAltNameString() which is publicly exposed via the member function __str__() #139

@crc32a

Description

@crc32a

just calling the member method str() on an X509Extention instance object will trigger a memory leak when the extension is a SubjectAltName. IE when str() is called and the condition if _lib.NID_subject_alt_name == self._nid triggers return self._subjectAltNameString()

proposed solution. Not sure I suspect GENERAL_NAMES_free may need to be registered as a garbage collection function at some point. I also noticed the GENERAL_NAMES_free is has no bindings in cryptography hazmat. :( Investigating.

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