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

Copy one extra byte from userspace filename #958

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Sep 15, 2023

Otherwise we will rewrite paths for filenames that begins with /system/bin/su.

This fix copies one extra byte from userspace filename so that when we encounter filenames like /system/bin/suasf,
/system/bin/su\0 gets compared with /system/bin/sua, which correctly prevents the su -> sh path rewriting.

Close #957

Otherwise we will rewrite paths for filenames that
begins with `/system/bin/su`.

Close tiann#957
kernel/sucompat.c Show resolved Hide resolved
@tiann tiann merged commit cbb98a1 into tiann:main Sep 16, 2023
12 checks passed
@kxxt kxxt deleted the fix/prefix-match branch September 16, 2023 04:26
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.

Incorrect syscall results on filenames that begins with /system/bin/su
2 participants