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

[Bug]: With 1.118.0, execve can execute wget + echo. Post 1.120.0, execve of wget gives Permission denied #4037

Closed
SwuduSusuwu opened this issue Jun 28, 2024 · 6 comments

Comments

@SwuduSusuwu
Copy link

SwuduSusuwu commented Jun 28, 2024

Problem description

Fdroid just has Termux up to 1.118.0,
but everyone kept saying it was important to get the new Termux,
thus switched to Google Store's Termux to get 1.120.0

Steps to reproduce the behavior.

~/ $ .git clone https://github.com/SwuduSusuwu/SubStack.git && cd ./Substack/ && ./build.sh > /dev/null
~/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/sh: 1: wget: Permission denied
Trap
~/SubStack $

What is the expected behavior?

~/SubStack $ ./a.out
cxx/Macros.hxx: pass
execves(): pass
execvex(): pass
virusAnalysisTestsThrows(): pass
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]

System information

~/SubStack $ termux-info
Termux Variables:
TERMUX_EXEC__PROC_SELF_EXE=/data/data/com.termux/files/usr/bin/termux-info
TERMUX_VERSION=0.129
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.net stable main
Updatable packages:
All packages up to date
termux-tools version:
3.0.7
Android version:
14
Device manufacturer:
Google
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
@SwuduSusuwu
Copy link
Author

Oops, is now 1.129 (not 1.120.0) of Termux
Must goto old (Fdroid version of) Termux?

@SwuduSusuwu
Copy link
Author

PS Termux's slideout drawer which was on the left (to switch tabs) is gone. [Too minor to post a whole new issue just for this.]

@Grimler91
Copy link
Member

thus switched to Google Store's Termux to get 1.120.0

Report in playstore repo, see README

@SwuduSusuwu
Copy link
Author

SwuduSusuwu commented Jun 28, 2024

If not from Google Store, new versions of Termux allow languages suchas C++ to execve libs suchas wget?
It is not a use that was deliberately removed (such as a compromise required to do #2155 )?

@Grimler91
Copy link
Member

Yes, only google play version (which is built from a quite different codebase) has such restrictions, termux from F-Droid and github releases work as before

@SwuduSusuwu
Copy link
Author

termux-play-store/termux-issues#24 (comment) has workaround for this

SwuduSusuwu added a commit to SwuduSusuwu/SubStack that referenced this issue Jun 28, 2024
  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)
SwuduSusuwu added a commit to SwuduSusuwu/SubStack that referenced this issue Sep 21, 2024
  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)
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