libModSecurity3: requests are blocked when SecRequestBodyNoFilesLimit
is set to a very high value
#3356
Labels
3.x
Related to ModSecurity version 3.x
Describe the bug
When
SecRequestBodyNoFilesLimit
is set to a very high value, all requests get incorrectly blocked as being too large. This does not happen on Apache.Logs and dumps
According to the debug log, it looks like an integer overflow is happening? I've attached the full debug log just in case.
To Reproduce
Steps to reproduce the behavior:
SecRequestBodyNoFilesLimit
to10737418240
curl -d "test=hello" localhost
.Request will be incorrectly blocked as being too large:
2025/03/31 16:45:39 [error] 2047#2047: *1 [client ::1] ModSecurity: Access denied with code 400 (phase 2). Matched "Operator `Eq' with parameter `0' against variable `REQBODY_ERROR' (Value: `1' ) [file "/etc/modsecurity/modsecurity.conf"] [line "69"] [id "200002"] [rev ""] [msg "Failed to parse request body."] [data "Request body excluding files is bigger than the maximum expected."] [severity "2"] [ver ""] [maturity "0"] [accuracy "0"] [hostname "::1"] [uri "/"] [unique_id "174339993925.897781"] [ref "v0,1"], client: ::1, server: _, request: "POST / HTTP/1.1", host: "localhost:8080"
This behavior does not happen on Apache.
Expected behavior
Request should not be blocked since I am below the limit.
Server (please complete the following information):
Rule Set (please complete the following information):
N/A
Additional context
modsec_debug.log
The text was updated successfully, but these errors were encountered: