-
Notifications
You must be signed in to change notification settings - Fork 34
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
Detect which process(es) is(are) blocking procmon's unload #17
Comments
@milabs I firstly thought this was based on processes blocking the release, but it seems that's not 100% true. For example, if I turn on procmon (state=1) and then I open ksysguard (KDE's task manager) and then I close it, I still can't unload procmon until I open ksysguard once again. Why could that be? |
Well, it's the result of the hooking technique. Let's look at how it's happend:
So, the problem is that when we unloading the module while But the next problem is that we don't know exactly how to do with such processes that sleeps near infinite time in the kernel. We can wait a lot and unload the module, but it leads to accidental crashes. Not the best case :) As I see it the possible solution is to create
Now, when we need to unload the module, we modify such stubs to looks like that:
Now, we unloading but don't touch these stubs. I meant that we don't free allocated area (which has exec permissions). The one problem here is that we eat some kernel's memory per What do you think? |
@milabs But that will happen if we alloc N bytes of memory for that stub and then unload the module (not state=0 but rmmod procmon)? Won't that stub memory just disappear (thus causing a crash in the sleeping processes)? |
@alexandernst As the stub resides in memory after unloading nothing bad happens when the |
@milabs Can you do a simple POC, please? |
@alexandernst Not now... Create and assign an issue please? |
@milabs Sure ;) |
Closing this as I just implemented #31. This is not needed anymore. |
When a hijacked syscall is called, it should store the PID of the process which called it, and when it's done, it should remove that PID.
This way we'll be able to tell which process(es) is(are) blocking procmon's unloading process.
EDIT: Depends on #31
The text was updated successfully, but these errors were encountered: