Skip to content
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

no protect for mutiple threads #10

Open
anatasluo opened this issue Nov 7, 2023 · 4 comments
Open

no protect for mutiple threads #10

anatasluo opened this issue Nov 7, 2023 · 4 comments

Comments

@anatasluo
Copy link

No description provided.

@DavidBuchanan314
Copy link
Owner

Could you be more specific?

@anatasluo
Copy link
Author

Could you be more specific?

For example, for a process consisting of multiple threads, when you continue the process, multiple threads may all execute this segment of code. It leads to several problems:

  1. dl_open is executed several times.
  2. one thread modifies the text while the other thread executes it, which may lead to segment fault.

Maybe steps should be like this:

  1. stop all threads
  2. continue one threads
  3. stop this threads again
  4. continue all threads

@anatasluo
Copy link
Author

@DavidBuchanan314

@DavidBuchanan314
Copy link
Owner

IIUC, there is no execute-while-writing race condition if you use the cgroup freezer stop method.

However, when the threads are restarted, you are correct that multiple threads could theoretically enter the shellcode simultaneously. Do you have a test program that exhibits this behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants