Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
fzipi
left a comment
There was a problem hiding this comment.
Thanks @A13501350, this is a nice, focused fix!
What I checked: I downloaded the x86 fuzzy.dll from the latest v2/master IIS run and from this PR's run and compared their import tables. On v2/master it imports libgcc_s_dw2-1.dll. With -static-libgcc it only imports KERNEL32.dll and msvcrt.dll. Across all DLLs in the x86 artifact, the only remaining imports are Windows system DLLs and the MSVC runtime, so no MinGW runtime is left in the chain. The x64 DLL is unaffected (UCRT api-ms-win-crt-* only). The new step logs PASS: 32-bit pool returned 200 in the test job.
A few comments, none blocking:
- (non-blocking) In the 32-bit pool step,
$ErrorActionPreference = 'Stop'doesn't apply to native commands, and theappcmdcalls go toOut-Nullwithout a$LASTEXITCODEcheck. Ifadd apppoolorset appfailed, the site's root app would stay onDefaultAppPool(64-bit), and the request on :8081 would still return 200, so the step would pass without touching the x86 module. Could you check$LASTEXITCODEafter eachappcmdcall, and maybe assert thatappcmd list wpshows a worker forModSec32Testafter the request? - (non-blocking) A 200 proves the module loads, but not that it inspects traffic in the 32-bit pool. One detectable request against :8081, with the same expectation as the 64-bit step, would close that gap. Keep in mind that #3613 changes those expectations.
- (non-blocking, optional) A build-time guard in the ssdeep step would catch this class of regression earlier and more directly, e.g.
objdump -p fuzzy.dll | grep -iE 'libgcc_s|libwinpthread' && exit 1. - (non-blocking) The hunk also drops
--build=i686-pc-mingw32andCXXFLAGS="-O3". Both are fine (MINGW32 already targets i686 andfuzzy.dllis C only), but a line about it in the commit message would help future readers. - FYI: this conflicts textually with #3613 in
test-ci-windows.yml, since both add steps afterTest IIS Module. I'm fine with landing this one first and rebasing #3613 on top. - (non-blocking) The last CI run is from mid-August. Could you rebase onto current
v2/masterso we get a fresh IIS run before merging?
c89bc4a to
9e57c31
Compare
|



Summary
Fixes #3599
The CI-produced x86 IIS module (
fuzzy.dll, ssdeep) was built with MinGW gcc and imported the MinGW runtime DLLs (libgcc_s_dw2-1.dll->libwinpthread-1.dll). These were not packaged in the MSI, so the x86 module failed to load in 32-bit application pools with error 126 (ERROR_MOD_NOT_FOUND), while the x64 module worked fine.Fix
In
.github/workflows/test-ci-windows.yml, build ssdeep with-static-libgccso the MinGW runtime is statically linked intofuzzy.dll. The resulting x86 DLL is self-contained and loads cleanly in 32-bit application pools without needing the external MinGW runtime DLLs.Regression test
Added a new
Test IIS Module in 32-bit Application Poolstep that:ModSecurity IIS (32bits)native module exists.dll failed to load/ error 126 entries.The test was validated against the previous (broken) build: with the old dynamic-link build the 32-bit pool returned HTTP 503 (module failed to load) and the step correctly failed; with this fix it returns HTTP 200 and passes.
Validation
unexpected status 503, confirming it reproduces and catches the x86 load issue.