You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any ideas on how we can improve our Termux coverage? I do not use Termux myself nor do I believe any active contributors do. Lets please be productive rather than complaining while people are trying to triage release-week problems. A test case, CI setup or help maintaining that platform would be useful.
I also tested the direct /storage/emulated/0/... path instead of Termux's ~/storage/shared symlink, with the same result, so this does not appear to be caused by the storage/shared symlink itself.
A diagnostic wrapper confirmed that the shell can cd to the exact destination immediately before exec rsync, while rsync then fails on the same path.
So the destination path is successfully resolved/stat'ed. The failure happens when the new 3.5.0 hardened path traversal tries to open / with O_RDONLY|O_DIRECTORY.
This seems consistent with Android/Termux allowing traversal through / to known paths while not allowing an untrusted app process to open the root directory for reading.
PR #1052 (O_PATH for directory traversal) appears to address exactly this case. The strace above also suggests that the issue is specifically the requirement to O_RDONLY-open the traversal anchor rather than an actual lack of access to the destination.
@ketas Termux was not tested because none of the active contributors use it. We cannot feasibly personally remind users of every platform before each release. If you are willing to test release candidates on Termux, that would genuinely help prevent this happening again. Otherwise, please do not assume coverage exists and then complain when it does not; as you stated, I cannot imagine the amount of platforms we would have to test on to cover every possible use-case.
@steadytao, feel free to use my PR #920 as a basis for running the test suite under Android if there is interest within the project in doing that. As I got no feedback after several requests I assumed there wasn't.
Any ideas on how we can improve our Termux coverage? I do not use Termux myself nor do I believe any active contributors do. Lets please be productive rather than complaining while people are trying to triage release-week problems. A test case, CI setup or help maintaining that platform would be useful.
Hello, the KVM-based solution in #920 is one option, which can have high accuracy, but requires a lot of setup and takes a long time to spin up.
There is also another option which is termux-docker, which can be run in the docker command directly in GitHub Actions regular steps, but can also, with some workarounds and setup, be used with the GitHub Actions container: directive to have every command in each step in the job run inside the Termux. My example for that is here:
termux-docker has somewhat lower accuracy of bare metal Android's behavior than regular KVM-based Android AVD emulators, but it is able to reproduce at least this specific recent problem with rsync.
Example of some basic commands and current output in termux-docker as an introduction:
~ $ mkdir test_dir
~ $ rsync a.out test_dir/
rsync: [Receiver] change_dir#1 "/data/data/com.termux/files/home/test_dir/" failed: Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(768) [Receiver=3.5.0]
~ $ pwd
/data/data/com.termux/files/home
~ $ termux-info
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
/data/data/com.termux/files/usr/bin/getprop: 3: exec: /system/bin/getprop: not found
Termux Variables:
unsupported
Packages CPU architecture:
i686
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.45.0
Android version:
Kernel build information:
Linux acc8d5b195b6 6.18.32-p2-gentoo-dist #1 SMP PREEMPT_DYNAMIC Mon May 25 02:11:07 CDT 2026 i686 Android
Device manufacturer:
Device model:
Supported ABIs:
SUPPORTED_ABIS:
SUPPORTED_32_BIT_ABIS:
SUPPORTED_64_BIT_ABIS:
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so
~ $
showing it reproducing this issue, showing its home folder path, and showing its termux-info output; termux-docker doesn't support the getprop command, so that is an example of one of the typical ways it differs from/is inaccurate to regular bare metal Android.
since it happened again, they probably didn't test it. or tested in different way
if somebody have reminded me to test it, it would have not happened. or any other termux users
in termux, updates of rsync are directly deployed (with an automated script and no maintainer intervention) to all users without runtime testing, only build testing. in Termux, it builds -> it ships.
clearly that has tradeoffs, but that is not my decision! It is something almost all of Termux has done for years before I started contributing to Termux.
i wonder if different androids need testing too, here
i think of android as massive shitshow that nobody wants to dev on or use but everybody has to endure. like 11th plague of egypt. because for some reason it's in nearly every phone. but it's about as hard and difficult as it can get. never got it
i wonder what does it take to automatically test rsync for some common platforms? hopefully vm's would be enough
unless i see it wrong, it would run overnight on a pc out of trash with less than a single sandwich amount of power cost? i mean it's 2026? no need to book computer time in university anymore. also why limit ourselves to some "github actions"
of course, if first tester is a person who upgrades their rsync in termux, then i'm not surprised if this becomes a regular thing. the user is a tester then. that probably pisses user off since (s)he expected it being tested since was published. because who publishes untested stuff? user also thinks that rsync is also widely known thing and therefore must certainly have been tested
to be honest, this isn't the first time when i run something and i'm like hey there's a bug right there. then i report it and dev agrees that there's indeed a bug. it doesn't seem to matter how big the project is or if it's paid or not
I found a related remaining case in the separate held-directory-fd path. It is tracked in #1064, with a proposed fix in #1065. #1052 fixed the original path, but some operations still require directory read permission where search permission should be sufficient.
Activity
steadytao commentedon Aug 13, 2026
Yeah, I know what is causing this. Last regression I am addressing before I get some more sleep and will return in the afternoon 😭
ketas commentedon Aug 14, 2026
i can't believe this happened again
steadytao commentedon Aug 14, 2026
Any ideas on how we can improve our Termux coverage? I do not use Termux myself nor do I believe any active contributors do. Lets please be productive rather than complaining while people are trying to triage release-week problems. A test case, CI setup or help maintaining that platform would be useful.
ketas commentedon Aug 14, 2026
i don't know how. maybe termux devs have ideas or they are willing to test it
since it happened again, they probably didn't test it. or tested in different way
if somebody have reminded me to test it, it would have not happened. or any other termux users
but i guess it wouldn't be hard to setup emulator
tho, rsync is used everywhere and i can't even imagine all platforms to test on
i would guess manual user test maybe? would be best
how do i know
the "i can't believe this happened again" was purely because i assumed that it's now tested and will not happ4n
ketas commentedon Aug 14, 2026
... will not happen again
nothing else
imagebuilder1837 commentedon Aug 15, 2026
I can confirm this on Termux with rsync 3.5.0.
The destination itself is accessible from the same SSH session and security context. For example, this succeeds:
cd /storage/emulated/0/Documents/example touch .test rm .testHowever, rsync 3.5.0 fails with:
I also tested the direct
/storage/emulated/0/...path instead of Termux's~/storage/sharedsymlink, with the same result, so this does not appear to be caused by thestorage/sharedsymlink itself.A diagnostic wrapper confirmed that the shell can
cdto the exact destination immediately beforeexec rsync, while rsync then fails on the same path.straceidentifies the failure more precisely:So the destination path is successfully resolved/stat'ed. The failure happens when the new 3.5.0 hardened path traversal tries to open
/withO_RDONLY|O_DIRECTORY.This seems consistent with Android/Termux allowing traversal through
/to known paths while not allowing an untrusted app process to open the root directory for reading.PR #1052 (
O_PATHfor directory traversal) appears to address exactly this case. Thestraceabove also suggests that the issue is specifically the requirement toO_RDONLY-open the traversal anchor rather than an actual lack of access to the destination.steadytao commentedon Aug 15, 2026
@ketas Termux was not tested because none of the active contributors use it. We cannot feasibly personally remind users of every platform before each release. If you are willing to test release candidates on Termux, that would genuinely help prevent this happening again. Otherwise, please do not assume coverage exists and then complain when it does not; as you stated, I cannot imagine the amount of platforms we would have to test on to cover every possible use-case.
ketas commentedon Aug 15, 2026
unsure why everyone seems like as if attacked here?
but yeah, i knew new rsync was coming out but i assumed there will be no issues anymore
altho last one was rare older android issue
i think rsync releases are still quite rare that i can test them manually
or i assume there are more users other than me, i bet we can find enough testers
from what i get, this is another overagressive security patch
anyway, i'm interested in testing them so by the time the release comes i don't need to downgrade :)
ribbons commentedon Aug 15, 2026
@steadytao, feel free to use my PR #920 as a basis for running the test suite under Android if there is interest within the project in doing that. As I got no feedback after several requests I assumed there wasn't.
robertkirkman commentedon Aug 15, 2026
Hello, the KVM-based solution in #920 is one option, which can have high accuracy, but requires a lot of setup and takes a long time to spin up.
There is also another option which is termux-docker, which can be run in the
dockercommand directly in GitHub Actions regular steps, but can also, with some workarounds and setup, be used with the GitHub Actionscontainer:directive to have every command in each step in the job run inside the Termux. My example for that is here:https://github.com/robertkirkman/termux-on-gha/blob/master/.github/workflows/build-and-test.yml
robertkirkman commentedon Aug 15, 2026
termux-docker has somewhat lower accuracy of bare metal Android's behavior than regular KVM-based Android AVD emulators, but it is able to reproduce at least this specific recent problem with
rsync.Example of some basic commands and current output in termux-docker as an introduction:
showing it reproducing this issue, showing its home folder path, and showing its
termux-infooutput; termux-docker doesn't support thegetpropcommand, so that is an example of one of the typical ways it differs from/is inaccurate to regular bare metal Android.robertkirkman commentedon Aug 15, 2026
in termux, updates of
rsyncare directly deployed (with an automated script and no maintainer intervention) to all users without runtime testing, only build testing. in Termux, it builds -> it ships.clearly that has tradeoffs, but that is not my decision! It is something almost all of Termux has done for years before I started contributing to Termux.
ketas commentedon Aug 15, 2026
i wonder if different androids need testing too, here
i think of android as massive shitshow that nobody wants to dev on or use but everybody has to endure. like 11th plague of egypt. because for some reason it's in nearly every phone. but it's about as hard and difficult as it can get. never got it
i wonder what does it take to automatically test rsync for some common platforms? hopefully vm's would be enough
unless i see it wrong, it would run overnight on a pc out of trash with less than a single sandwich amount of power cost? i mean it's 2026? no need to book computer time in university anymore. also why limit ourselves to some "github actions"
of course, if first tester is a person who upgrades their rsync in termux, then i'm not surprised if this becomes a regular thing. the user is a tester then. that probably pisses user off since (s)he expected it being tested since was published. because who publishes untested stuff? user also thinks that rsync is also widely known thing and therefore must certainly have been tested
to be honest, this isn't the first time when i run something and i'm like hey there's a bug right there. then i report it and dev agrees that there's indeed a bug. it doesn't seem to matter how big the project is or if it's paid or not
how to fix things like this?
steadytao commentedon Aug 16, 2026
Thank you all for the ideas. Working out a scope for a CI rework, you can track that here - #1059
steadytao commentedon Aug 16, 2026
Otherwise this is resolved, I will merge relatively shortly**
Thank you all for your time
ketas commentedon Aug 17, 2026
ok
my mistake was to trust it being tested now
here's files i use to backup my phones, should any devs have any around and wish to dogfood:
http://ketas.si.pri.ee/misc/termux-rsync-backup/
or
job-add.sh
job-del.sh
job-list.sh
periodic.sh
rsync-backup-storage.sh
rsync-backup-termux.sh
steadytao commentedon Aug 17, 2026
Thank you very much!
TomJo2000 commentedon Aug 18, 2026
steadytao commentedon Aug 18, 2026
Thank you ❤️
FusionPow commentedon Aug 19, 2026
I found a related remaining case in the separate
held-directory-fdpath. It is tracked in #1064, with a proposed fix in #1065. #1052 fixed the original path, but some operations still require directory read permission where search permission should be sufficient.ci: pin Debian/Fedora test images below rsync 3.5.0
fork: seed from gokrazy/rsync with receiver-side --partial (#1)