Open
Description
Describe the bug
When we want to upload a huge file (>2GB) to a remote web site (Artifactory in our case) , our http client hangs indefinitely.
However, the file is correctly uploaded to Artifactory.
Logs and dumps
Output of:
- DebugLogs (level 9), cf attachments
- AuditLogs : this file is empty
- Error logs :
To Reproduce
On a GNU/Linux machine do :
dd if=/dev/urandom of=/tmp/2G.txt bs=1M count=2048
curl -u <myuser>:<my_api_key> -T /tmp/2G.txt 'https://artifactory.local/artifactory/generic/perf_debug/2G.txt
Then, the curl
hangs.
Expected behavior
curl
ends whithout error.
Server :
- ModSecurity version (and connector):
ModSecurity
v3.0.12
and3.0.14
withnginx-connector
v1.0.3
- WebServer:
nginx-1.18.0
- OS:
GNU/Linux
,Ubuntu 22.04
Rule Set (please complete the following information):
- Running any public or commercial rule set? Core Security Rules, version
4.5.0
Additional context
- The infrastructure is made like :
client -> haproxy -> nginx(+ modesec) -> Artifactory
- More than the file size , the time to upload is more than 250 seconds when the upload fails
- The problem persists when we disable
Core Security Rules
usage - The only way to avoid the problem is to set
modsecurity off;
in my vhost configuration - Artifactory return a
HTTP 201
- HTTP method used is
PUT
- strace -> see attachments
- TCP segment missing when modsec is enabled (on nginx machine, interface connected to haproxy machine) :
69719 272.819868 172.16.3.13 172.16.3.12 TCP 66 443 → 36912 [FIN, ACK] Seq=6734 Ack=2104577102 Win=2021120 Len=0 TSval=55543961 TSecr=2937796858
Attachments: