-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
2.xRelated to ModSecurity version 2.xRelated to ModSecurity version 2.xPlatform - NginxduplicateOps. Somebody else already hit that bumpOps. Somebody else already hit that bumpworkaround availableThe issue has either a temporary or permanent workaround availableThe issue has either a temporary or permanent workaround available
Milestone
Description
Describe the bug
We have observed a memory leak in ModSecurity for Nginx that happens in both detection-only and prevention modes for HTTP/1.0 requests. This leak reproduces with both v2.9.2 and 2.9.3
Steps to reproduce the behavior:
- Create a simple payload file like this:
> cat aaa.aaa
aaaaaaaaaaaaaaaaaaaaaaaa
- Run Apache Bench against your v2 gateway. Apache Bench uses HTTP/1.0:
ab -p aaa.aaa -n 100000 -c 100 -k http://mywafv2/
- Observe the memory consumption of Nginx worker process with
ps aux | grep nginx
You should notice how memory consumption keeps growing over time.
Expected behavior
Memory consumption keeps at approximately the same level over the entire stress testing.
Actual behavior
Memory consumption keeps growing throughout stress testing and does not go down after it is completed.
Server (please complete the following information):
- ModSecurity version (and connector): v2.9.2 and v2.9.3
- WebServer: nginx-1.13.8
- OS (and distro): Ubuntu Linux 16.04.3 LTS
Rule Set (please complete the following information):
CRS 3.0, no custom or commercial rules.
Additional context
- Valgrind did not show any apparent leaks, only "still reachable" and "possibly lost".
- HTTP/1.1 doesn't seem to be affected, I've used SuperBenchmarker (https://github.com/aliostad/SuperBenchmarker) and memory consumption was stable.
Metadata
Metadata
Assignees
Labels
2.xRelated to ModSecurity version 2.xRelated to ModSecurity version 2.xPlatform - NginxduplicateOps. Somebody else already hit that bumpOps. Somebody else already hit that bumpworkaround availableThe issue has either a temporary or permanent workaround availableThe issue has either a temporary or permanent workaround available