alexchandel
The Windows installer for OpenPLC Editor (2024-02-05) (verified SHA-1 sum 20ca19add6f0bc165b9c15c8ad4a26c5c6dbfa39) ships a file, mingw\lib\python3.9\lib-dynload\_sha3.cp39-mingw_x86_64_ucrt.pyd , which is either corrupt or malicious.
 
Unlike every other .pyd file in that folder, it is not a legal PE32+ executable (disassemblers report encountering the end of the file unexpectedly, and cannot inspect its symbol table).  It is also much larger than the other _sha* pyd files (101 KB vs ~ 28-38 KB for others), and does not seem to match the normal signature for that file.
 
Has the build process been compromised?
Reply 0 0
thiagoralves
This file is part of the MinGW package compiled with GCC 13.2.0 available on https://winlibs.com/ packaged on 2023-11-21 (which I believe is still the latest UCRT build). Unless the MinGW build is compromised (which I believe it isn't), I don't think there is any reason to worry. But still, further investigation might prove otherwise. Check if the shasum of the offending file is still the same when compared with a fresh download from winlibs. If it is, then check with the winlibs folks if that file is really supposed to be there. Invalid PE with unexpected end of file really sounds suspicious.
Reply 0 0
alexchandel
I found the matching release https://github.com/brechtsanders/winlibs_mingw/releases/tag/13.2.0posix-17.0.5-11.0.1-ucrt-r3, and the file's SHA1 (43c8deb5492a96825d6451eaf57891509c5ed7de) matches what you distribute. So it's a problem with that release.
 
But there are actually some later releases (https://github.com/brechtsanders/winlibs_mingw/releases/), if you'd like to incorporate those. GCC 14.1.0 is out, and also LLVM 18.1.5 is now packaged (yours has LLVM 17.0.5). And more importantly, the latest release's _sha3 DLL is not corrupt, so it is easier to analyze for security purposes. (read-obj happily decompiles it). Although it is still ~90 KB larger than other _sha* DLLs (I think the source is here: https://github.com/python/cpython/blob/main/Modules/sha3module.c). So I would recommend updating your distribution.
Reply 1 0
Write a reply...
Reply