-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Bug]: With 1.118.0, execve
can execute wget
+ echo
. Post v1.129 Termux, execve
of wget
gives Permission denied
#24
Comments
@SwuduSusuwu Thanks for reporting! For now you need to keep the A possible change is like: diff --git a/cxx/ClassCns.cxx b/cxx/ClassCns.cxx
index fff52df..652429a 100644
--- a/cxx/ClassCns.cxx
+++ b/cxx/ClassCns.cxx
@@ -31,6 +31,14 @@ const int execves(const std::vector<const std::string> &argvS, const std::vector
for(auto x = envpSmutable.begin(); envpSmutable.end() != x; ++x) {
envp.push_back(const_cast<char *>(x->c_str()));
}
+ char* ld_preload = getenv("LD_PRELOAD");
+ if (ld_preload) {
+ // Keep LD_PRELOAD, necessary for now on the Google Play build of Termux.
+ char* ld_preload_env;
+ int allocated_bytes = asprintf(&ld_preload_env, "LD_PRELOAD=%s", ld_preload);
+ assert(allocated_bytes > 0);
+ envp.push_back(ld_preload_env);
+ }
envp.push_back(NULL);
execve(argv[0], &argv[0], &envp[0]); /* NORETURN */
exit(EXIT_FAILURE); In the future we might not need this, but for now it's necessary. |
as workaround (for termux-play-store/termux-issues#24 termux/termux-app#2155 termux/termux-app#4037 ). Fixes ``` ~/SubStack $ ./a.out cxx/Macros.hxx: pass execves(): pass execvex(): pass virusAnalysisTestsThrows(): pass assistantCnsTestsThrows(): /data/data/com.termux/files/usr/bin/sh: 1: wget: Permission denied /data/data/com.termux/files/usr/bin ``` , (to ``` conversationCnsTestsThrows(): --2024-06-15 18:22:01-- https://stackoverflow.com/robots.txt Resolving stackoverflow.com (stackoverflow.com)... 172.64.155.249, 104.18.32.7 Connecting to stackoverflow.com (stackoverflow.com)|172.64.155.249|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: ‘robots.txt’ robots.txt [ <=> ] 1.99K --.-KB/s in 0.07s 2024-06-15 18:22:02 (27.4 KB/s) - ‘robots.txt’ saved [2036] ``` , as was)
Cool workaround (is success,) but missed the note (that new versions might not require this;) now unsure if should have closed. Oops |
No problem, I think we can close this specific issue! Thanks! |
as workaround (for termux-play-store/termux-issues#24 termux/termux-app#2155 termux/termux-app#4037 ). Fixes ``` ~/SubStack $ ./a.out cxx/Macros.hxx: pass execves(): pass execvex(): pass virusAnalysisTestsThrows(): pass assistantCnsTestsThrows(): /data/data/com.termux/files/usr/bin/sh: 1: wget: Permission denied /data/data/com.termux/files/usr/bin ``` , (to ``` conversationCnsTestsThrows(): --2024-06-15 18:22:01-- https://stackoverflow.com/robots.txt Resolving stackoverflow.com (stackoverflow.com)... 172.64.155.249, 104.18.32.7 Connecting to stackoverflow.com (stackoverflow.com)|172.64.155.249|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: ‘robots.txt’ robots.txt [ <=> ] 1.99K --.-KB/s in 0.07s 2024-06-15 18:22:02 (27.4 KB/s) - ‘robots.txt’ saved [2036] ``` , as was)
Problem description
For the last 2 years Fdroid, just has Termux up to 1.118.0,
but everyone kept saying that it was important to get the new Termux ( termux/termux-app#2155 at last has progress ),
thus switched to Google Store to get v1.129 of Termux
What steps will reproduce the bug?
What is the expected behavior?
System information
The text was updated successfully, but these errors were encountered: