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

Fix fd sanitization #7464

Closed
wants to merge 1 commit into from
Closed

Fix fd sanitization #7464

wants to merge 1 commit into from

Conversation

canyie
Copy link
Collaborator

@canyie canyie commented Oct 28, 2023

  • Fix broken logic introduced by commit 79a1c39 which modify fds_to_ignore when android_log_close is called, where fds_to_ignore was already read and converted into a C++ vector, so our hacks never take effect. This fixes Zygisk's FD sanitization broken on 26302 #7448
  • The previous logic rely on android_log_close to close logd_fd in zygote and causes logd_fd being closed and re-acquired too many times. Update fds_to_ignore in zygote process as well to avoid that case.

- Fix broken logic introduced by commit 79a1c39 which modify `fds_to_ignore` when `android_log_close` is called, where `fds_to_ignore` was already read and converted into a C++ vector, so our hacks never take effect. This fixes topjohnwu#7448
- The previous logic rely on `android_log_close` to close `logd_fd` in zygote and causes `logd_fd` being closed and re-acquired too many times. Update `fds_to_ignore` in zygote process as well to avoid that case.
@RV7PR
Copy link
Contributor

RV7PR commented Oct 28, 2023

No issues with this build🎉

@yashikada
Copy link

I think this PR is superseeded from this commit 489100c

@topjohnwu
Copy link
Owner

Included in 489100c

@topjohnwu topjohnwu closed this Nov 6, 2023
@canyie canyie deleted the sanitize branch November 6, 2023 07:20
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

Successfully merging this pull request may close these issues.

Zygisk's FD sanitization broken on 26302
4 participants