Skip to content

pesec: fails to properly read PE file on s390x #198

@davidpolverari

Description

@davidpolverari

Describe the bug
pesec does not recognize a PE-compliant file on s390x. Fails with:

ERROR [-18]: not a PE file

To Reproduce
Please provide us with:

  • pev version: 0.82
  • OS version: Debian sid
  • The file(s) you've analysed with pev: /usr/share/win32/gzip.exe as installed by the gzip-win32 package on Debian sid
  • The command you've used with the files, with all the flags: pesec /usr/share/win32/gzip.exe

Expected behavior
I expected pesec would read the PE file and report about its security properties.

Screenshots
N/A.

Additional context
The failure is likely due to libpe not taking endianness into account when loading the file into memory, being tested mostly on little-endian architectures (as amd64 and arm64). Those problems arise on s390x, as it is a big-endian architecture.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions