Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] OID/BER memory oddness

From: Ed Beroset <beroset@xxxxxxxxxxxxxx>
Date: Sun, 15 Dec 2013 13:42:50 -0500
Evan Huus wrote:

The part that's confusing me is that somehow
actx->external.direct_reference seems to be getting a pointer to this
stale ep-allocated buffer, but I can't find anywhere in the call stack
that value could be set to such a stale buffer.

That would probably be dissect_ber_OBJECT_IDENTIFIER which calls dissect_ber_object_identifier_str(), which calls dissect_ber_any_oid_str() which calls oid_encoded2string.

Tracing through the ASN1 code is not very easy in my experience. I have also been thinking that it would be nice to modify asn2wrs.py so that it would use the new style encapsulated hf variables but I haven't yet had time to dig into that. Such a change would require some careful testing of all of the ASN1 protocols.

Ed