-
Notifications
You must be signed in to change notification settings - Fork 1.7k
segmentation fault with SecStreamInBodyInspection and chunked encoding #2628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Minimal config to reproduce the problem:
|
Example of stack trace:
|
Hi @marcstern , I rather suspect that this has nothing to do with ModSecurity. For one thing, there are no ModSecurity functions in the call stack. That alone is only an indicator rather than a guarantee of any sort, however ... There have been other reports of a comparable failure using Redhat 8 unrelated to ModSecurity, see for examples these items from a thread ... What do you think? |
Hi @martinhsv , "SecStreamInBodyInspection on" generates the core dump, "SecStreamInBodyInspection off" works correctly. |
Hi @marcstern , If the on/off setting toggles the outcome reliably, then that does suggest some interaction between ModSecurity and the non-ModSecurity call stack that you provided in your third comment. However, that doesn't necessarily mean that the actual code bug is in ModSecurity code -- it could equally be in non-ModSecurity apache code that is engaging in some memory misuse. Nevertheless, I will re-open this at least temporarily. However, given that:
... I doubt I can justify spending a whole lot of time on this item (especially in the near term). But perhaps some member of the community will feel inclined to dig into this further. |
Solved with httpd 2.4.48+ |
On Redhat/CentOS/Rocky 8, httpd crashes with a segmentation fault when enabling SecStreamInBodyInspection and sending a chunked encoded request.
This happens with the platform httpd & mod_security2. Same with latest mod_security2 (v2/master 2.9.4).
Note that the crash doesn't happen in CentOS 7, nor in Fedora. I guess there's a memory problem that corrupts the memory, but not always in a critical location.
This can be reproduced with this simple request:
curl -v -H "Transfer-Encoding: chunked" -d hello http://x/a
The text was updated successfully, but these errors were encountered: