Closed
Description
This problem was originally reported by @defanator. @defanator also investigated the issue, nailing down the problem to the exactly point where the code is crashing.
Bellow is a simple configuration that will lead to the crash:
server {
listen 80;
modsecurity on;
modsecurity_rules '
SecDefaultAction "phase:2,deny"
';
location / {
proxy_pass http://backend;
}
location /another/one {
proxy_pass http://backend;
}
location /and/third/one/ {
proxy_pass http://backend;
}
}
Here crash stack trace:
#0 0x0000000000000061 in ?? ()
#1 0x00007fbeb7867376 in modsecurity::Rules::~Rules (this=0x23f4440, __in_chrg=<optimized out>) at rules.cc:97
#2 0x00007fbeb786739e in modsecurity::msc_rules_cleanup (rules=0x23f4440) at rules.cc:357
#3 0x00007fbeb7b45645 in ngx_http_modsecurity_config_cleanup (data=0x23f1438) at ../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:611
#4 0x000000000040df2c in ngx_destroy_pool (pool=0x236c4f0) at src/core/ngx_palloc.c:57
#5 0x000000000043031a in ngx_worker_process_exit (cycle=cycle@entry=0x236c540) at src/os/unix/ngx_process_cycle.c:1001
#6 0x0000000000430407 in ngx_worker_process_cycle (cycle=cycle@entry=0x236c540, data=data@entry=0x0) at src/os/unix/ngx_process_cycle.c:758
#7 0x000000000042ee60 in ngx_spawn_process (cycle=cycle@entry=0x236c540, proc=proc@entry=0x430352 <ngx_worker_process_cycle>, data=data@entry=0x0,
name=name@entry=0x481297 "worker process", respawn=respawn@entry=-3) at src/os/unix/ngx_process.c:198
#8 0x000000000043053b in ngx_start_worker_processes (cycle=cycle@entry=0x236c540, n=8, type=type@entry=-3) at src/os/unix/ngx_process_cycle.c:358
#9 0x0000000000430e0f in ngx_master_process_cycle (cycle=cycle@entry=0x236c540) at src/os/unix/ngx_process_cycle.c:130
#10 0x000000000040c94e in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:367
Metadata
Metadata
Assignees
Labels
No labels