Cross-Version Python Unmarshal #73
Labels
feature
Discusses the implementation of a new feature.
help-wanted
The maintainer would actually accept PRs to fix this, maybe even desperately so.
The
pym
unit currently just uses the unmarshal method that is provided by the current Python interpreter. This can easily fail if the target binary was marshaled with a different version, since the marshal format is an implementation detail and changes across Python versions.I had assumed that xdis unmarshal would be a solution to this problem, but testing and inspection of their code indicates that this is wrong: While their unmarshal implementation accepts a
version
parameter, this parameter has no effect on the unmarshal implementation and using it on several test samples failed for every conceivable version input.The alternative is straightforward but will take some time: Re-implement a version-agnostic unmarshal by going through past versions of marshal.c in the CPython code.
The text was updated successfully, but these errors were encountered: