-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Modsecurity v2.9.3 causes handle leak in Apache httpd #2181
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
Hi @Elavarasan83, Can you give further details on the loaded rules? what if the rules are not loaded? do we still have the leak? |
Hi @zimmerle Thanks for the response. Note: |
Hi @Elavarasan83 , Will this be fixed, the leaking handles? |
Did you try with the trunk version? |
No, we did not. We only use the bins available at ApacheLounge. |
I've been working on several memory leaks, especially in WIndows builds, in the latest months. Most of them are in the trunk. Some not (i.e. #2208). |
@marcstern please share with the community in a format of a pull request, so it will be available to everybody. Having a pull request, we can make sure that it is passing all the regression and unit tests. |
As I have the impression that v2 is not considered anymore (several trivial PR related to memory problems, mine related to the JSON standard), I must admit I'm not very motivated to take the time for a PR each time. |
I am sorry to hear that but you got the wrong impression. Version 2 is still maintained. Back in December 2.9.3 was released. Providing pull requests is the best way for you to contribute to the community. The fact that it was not yet merged does not mean that it is putting aside, that is the wrong impressions. Let's say that if the pull request was there @radboud-asselman, @Elavarasan83, and others who may hit with that same issue, will be able to test and provide feedback on your patch. That will be for the benefit of everybody. |
I am also seeing a handles leak. I narrowed it down to OWASP rule 901321. |
@leancz Thanks for narrow down to one rule. For the reference -
|
The token handle leak is not caused by ModSecurity directly but by function apr_uid_current (userinfo.c) from APR library. In version 2.9.3 apr_uid_current is called from function collection_retrieve_ex (persist_dbm.c). It was added with the following commit. There is already a fix in APR trunk version. |
Made a new libapr-1.dll available with the handle fix at https://www.apachelounge.com/viewtopic.php?t=8808 |
Given the updates from @olivermoellmann and @SteffenAL (Thank, both, BTW), I'm presuming that there is no further value in keeping this item open for the ModSecurity project. |
Handle count is increasing in Apache httpd.
The behavior is seen with the environment:
OS: Windows 10 x64
Modsecurity: v2.9.3
Apache: v2.4.38 (or) v2.4.41
Upon using the process explorer, I found that 'NT AUTHORITY\SYSTEM:3e7' handle is frequently allotted and not released.

The text was updated successfully, but these errors were encountered: