Giter Club home page Giter Club logo

Comments (9)

zimmerle avatar zimmerle commented on June 3, 2024 2

Fixed at: 61f2ff1

Thanks @Goron1606

from modsecurity-apache.

cyberblackhole avatar cyberblackhole commented on June 3, 2024 2

@zimmerle , @victorhora

Thanks for the support and quick fix.

from modsecurity-apache.

victorhora avatar victorhora commented on June 3, 2024 1

I would recommend recompiling everything (ModSecurity, Apache, Apache-connector) with debug symbols. This is usually accomplished by appending CFLAGS/CPPFLAGS like so:

$ export CFLAGS="-g -O0"

After that you can collect the stack traces by following these steps: https://httpd.apache.org/dev/debugging.html

You should also check the debugging section in the README of libModSecurity and the Apache connector

Thanks for your support :)

from modsecurity-apache.

cyberblackhole avatar cyberblackhole commented on June 3, 2024 1

@victorhora Please find below the attached stacktrace of apache server

(gdb) run
Starting program: /usr/sbin/apache2 -X -d /etc/apache2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: Temporarily disabling breakpoints for unloaded shared library "/opt/ModSecurity-apache/src/.libs/mod_security3.so"

Breakpoint 1, 0x00005555555c5ee0 in ap_process_request ()
(gdb) n
Single stepping until exit from function ap_process_request,
which has no line number information.

Breakpoint 2, create_tx_context (r=0x7fffe8c2a0a0) at src/mod_security3.c:135
135	    msc_t *msr = NULL;
(gdb) n
136	    msc_conf_t *z = NULL;
(gdb) n
137	    char *unique_id = NULL;
(gdb) n
139	    z = (msc_conf_t *)ap_get_module_config(r->per_dir_config,
(gdb) n
142	    msr = (msc_t *)apr_pcalloc(r->pool, sizeof(msc_t));
(gdb) n
143	    if (msr == NULL) {
(gdb) n
147	    msr->r = r;
(gdb) n
148	    unique_id = getenv("UNIQUE_ID");
(gdb) n
149	    if (unique_id != NULL || strlen(unique_id) > 0) {
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8c45222 in create_tx_context (r=0x7fffe8c2a0a0) at src/mod_security3.c:149
149	    if (unique_id != NULL || strlen(unique_id) > 0) {
(gdb) where
#0  0x00007fffe8c45222 in create_tx_context (r=0x7fffe8c2a0a0) at src/mod_security3.c:149
#1  0x00007fffe8c456b1 in hook_request_late (r=0x7fffe8c2a0a0) at src/mod_security3.c:371
#2  0x00005555555a3f00 in ap_run_fixups ()
#3  0x00005555555a661d in ap_process_request_internal ()
#4  0x00005555555c5d08 in ap_process_async_request ()
#5  0x00005555555c5ef0 in ap_process_request ()
#6  0x00005555555c213d in ?? ()
#7  0x00005555555b79f0 in ap_run_process_connection ()
#8  0x00007ffff4819831 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#9  0x00007ffff4819ae3 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#10 0x00007ffff481acad in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#11 0x000055555559119e in ap_run_mpm ()
#12 0x0000555555589a7b in main ()
(gdb) 

from modsecurity-apache.

c0deguard avatar c0deguard commented on June 3, 2024

I'm also facing similar issue.
I guess this is because of some bug in "Proposed fix for msc_process_request_body call too early"
Here it shows building failed because of this https://travis-ci.org/SpiderLabs/ModSecurity-apache

from modsecurity-apache.

victorhora avatar victorhora commented on June 3, 2024

Hi all

I think there's an issue there indeed, but i'm not sure its related with the fact that the tests from Travis are failing. This is what Travis says about the build:

image

So Apache is failing to start (or the script is believes is the case) and unless the issue is happening right at the start of Apache/ModSecurity, it might be something wrong with the tests.

Could you please provide a full backtrace/stacktraces of this issue for further investigation?

Thanks

from modsecurity-apache.

cyberblackhole avatar cyberblackhole commented on June 3, 2024

@victorhora Can you please specify the logs which you require and their file paths?

from modsecurity-apache.

zimmerle avatar zimmerle commented on June 3, 2024

Hi @Goron1606,

Do you happens to have mod_unique_id loaded?

from modsecurity-apache.

cyberblackhole avatar cyberblackhole commented on June 3, 2024

Hi @zimmerle ,

I confirm the module is enabled.

from modsecurity-apache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.