Repository navigation
1.27.7: cgroups in root mode, build attestation, compat page, honest docs #73
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
Merged
+1,033
−32
Merged
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
e233f6a
Sessions that come back, own keys, pinch zoom, SSH server, web server…
claude 0a52b5c
Native extractor: read a .tar.zst to its end, so that zstd checks its…
claude 575bb78
Emulator test: export ssh_login, which expect runs in a new bash
claude 35abde8
Emulator test: align cortex-emu-runner for 16 KB pages
claude 49164be
Native extractor: decompress a .tar.zst on a thread of its own
claude ba1a75e
Hook: the app's files are root's in stat(), as the programs are root
claude 6e98a24
Changelog: git's ownership check is fixed, not restored
claude 45ecea3
Hook: accept() as accept4(), the call Android's seccomp filter is mad…
claude 9a61e5b
Emulator test: time limits on adb, no packages on the 16 KB image
claude cc7e60a
Hook: sshd's privilege-separated user has root's ids
claude 5f7e2fc
Hook: the fortified getgroups and recvfrom go through it too
claude 2f15a34
Changelog: the emulator test's 16 KB run, ownership check and adb limits
claude 1d4ffa7
Hook: sandbox limits that take away descriptors are not applied
claude c521330
Hook: closefrom() and close_range() leave the ARM translator's memory…
claude 3993d55
Hook: know the ARM translator's memory file by its name
claude ce61c6e
Emulator test: record what a program sees of its executable and descr…
claude 9054195
Static Go programs see the rootfs: Ubuntu's paths and programs for Go
claude f3cbede
Merge the Go support onto the branch's merged history (v1.26.38 was s…
claude fcb2f3b
A new look around the terminal: tabs, themed keys and drawer, seven m…
claude 649be84
Scroll position and a way back to the end, a themed first-start dialo…
claude 545da3c
Go programs patched in normal mode keep working in root mode; README
claude ce39a5b
Website and README: Go programs no longer need root mode; tabs and co…
claude ddd5c33
Tests: the tabs, keys, search bar, layouts, first-start dialog and sc…
claude 721e363
Go programs: CORTEX_NO_GOSYS switch and an unpatched control in the e…
claude 7812fe5
Settings theme: the interface's own containers and outline colors, no…
claude adc951a
Emulator test: a second session is started, and the scheme picker is …
claude ef79aa8
Scheme picker in the interface's colors; the emulator test retries op…
claude 7b079fa
README and website: screenshots of the new interface, and the scheme …
claude 56e138d
Package compatibility run: apt-get is not started by timeout in the b…
claude 2316c10
Version 1.26.39: Go programs see Ubuntu, session tabs, seven more col…
claude cd303dd
Hook: Rust programs no longer crash in statx; reading /proc/self/fd o…
claude 7d467e2
Merge the branch's merged history (PR #28 was squashed into main)
claude c39b5f5
Hook: shadow database and SELinux for Ubuntu's programs, the translat…
claude af04acc
Fix unclosed Kotlin comment in BaseUsers KDoc
claude 4bc81d7
Version 1.26.40: faster program starts, sudo/su without root, Rust, r…
claude f98f6a1
Compat run: a MariaDB row; docs say MariaDB and redis run
claude 958bd68
Emulator test: base users and groups, sudo
claude f1101fc
A color scheme chosen later reaches the cells of the sessions (#29)
claude 29310aa
Review fixes: scheme remap by role, slots of vfork children given bac…
claude a56e0f4
Merge the branch's merged history (PR #31 was squashed into main)
claude 5fedf73
No more ~/storage link to the shared storage (1.26.41)
claude bcb86ef
Fix the unclosed comment in the storage-link KDoc; test that no Kotli…
claude 0803909
Test that a ~/storage link to another place is left alone
claude 2474682
Start the next change from main
claude 8cc804b
New app icon, held backspace keeps deleting, copy bar in the right pl…
claude 5c9e1af
Chinese, Japanese, Korean and emoji take two cells instead of overlap…
claude 0d6afc9
Start the next change from main
claude c5829ae
Fix a half left behind after inserting over a wide character; keep th…
claude f46bd24
Copy: a selection that ends on the first half of an emoji takes the w…
claude de3b864
Wide characters: mark the wrap padding, blank halves fully, cut copy;…
claude c9eb9df
Start the next change from main
claude 4ae2b29
A cleaner drawer and tabs, and a white color scheme; 1.26.44
claude abc4169
Test the session tabs row by row, and their screen reader labels
claude 515d3c7
Settings: the back arrow follows the color scheme
claude 1d22b55
e2e: scroll the settings list all the way up before choosing the whit…
claude 73f39f1
e2e: give the terminal the focus before typing in the second session
claude ed8ea5e
Hook: the real path of an open file keeps the rootfs in front of it
claude a72c5b1
Terminal: a character of the supplementary planes that wcwidth() give…
claude e6cfa61
Test: compare the colors with the ones the escape codes set
claude 662a6ea
Review: fd links only for fd/N, the root tab says root, a plain curso…
claude 07ce921
e2e: pictures for the README (neofetch, the end of the settings)
claude 0d655de
Merge the earlier history of this branch (squash-merged as #37)
claude 6157483
README and website: the session cards have no directory in their pict…
claude 9b39eb7
e2e: neofetch for the README with the small logo and lines that fit
claude 9d4fb47
tests/e2e: a script that makes the README's pictures from an emulator…
claude d085168
e2e: neofetch for the README without the emulator's model and archite…
claude dc33763
README and website pictures from the 1.26.44 emulator run
claude a342bd2
e2e: the neofetch picture only after a successful install and a finis…
claude bf700b5
The keyboard's Select all, Copy, Cut and Paste work in the terminal, …
claude 94fc8d4
Merge the earlier history of this branch (squash-merged as #37 and #38)
claude c09f130
Review: Cut also does what delete does, the selection is the session'…
claude b3c825a
Review: the selected text is read under the emulator's lock
claude 9855312
Go programs built for Android get Cortex's change, micro no longer ha…
ssfuisu 4a0c199
Merge the earlier history of this branch (squash-merged as #37, #38, …
ssfuisu 08c6397
Review: a clipboard note from the future is ignored, a timed-out clip…
ssfuisu 372d6bc
The clipboard commands keep their deadline inside cortex-api (read -t…
ssfuisu 49e591b
A directory that has lost its owner's rights is repaired when a name …
ssfuisu b0a4808
Merge the earlier history of this branch (squash-merged as #45)
ssfuisu 2435128
The directory repair test also runs as a user that is not root but ha…
ssfuisu 070181b
Review: the emulated hard link is looked up again after a directory w…
ssfuisu a108995
Hardware keyboard Ctrl, Alt and Shift reach the terminal; system() an…
ssfuisu 54ad7bb
Review: system(NULL) checks for Ubuntu's shell, concurrent system() c…
ssfuisu 536394a
Keep the branch on main after the 1.26.47 squash merge
claude b2e5618
Programs a shell starts take fewer page faults: the exec code is prep…
claude ee332e8
1.26.48: version and changelog
claude 5789211
Review: the fork preparation does not wait for its lock (a signal han…
claude c134b52
Keep the branch on main after the 1.26.48 squash merge
claude 71bd87b
Servers on a port the kernel picked are no longer connected to by the…
ssfuisu 842ee05
Website: animated redesign
ssfuisu f4ffbfb
Review: a new socket starts without a chosen port, the qemu test find…
ssfuisu fdf9341
Pick the test port below the kernel's range, softer button shine in l…
ssfuisu 76ced74
1.26.49
ssfuisu 71394e0
Merge branch after squash
ssfuisu d549b0f
Website: drawn SVG icons instead of emoji
ssfuisu ac61da7
Merge branch after squash
ssfuisu 76dade0
README: the phone's files are at /sdcard, near the top
ssfuisu 9b3aa5d
Merge branch after README push
ssfuisu b9e3275
Programs find libraries through their RUNPATH (adb, fastboot); 1.26.50
ssfuisu f032f44
RUNPATH: search order as on Linux, any number of headers
ssfuisu 7081ddd
Merge branch after squash
ssfuisu 7bd9964
Desktop (X11) add-on, ld.so.conf.d/ldconfig/ldd, SysV shared memory; …
ssfuisu 776bcb5
Review fixes: ld.so with its own --library-path, ldconfig marks ld.so…
ssfuisu 5cfa504
Desktop and hook review fixes
ssfuisu e62136c
Merge branch state after #57 [skip ci]
ssfuisu efc45d6
Drawer: the desktop as a monitor icon next to the update check
ssfuisu a7e2789
Install: read the archive from the APK file with a CRC check, never m…
ssfuisu 1883d92
installBootstrap: progress stays the last parameter (the trailing lam…
ssfuisu c6abc3f
Bootstrap reads: close the stream when the header read fails, copy fr…
ssfuisu c0cdec3
Merge branch state after #59 [skip ci]
ssfuisu b8d7e2d
SysV shm: a segment marked removed stays attachable for a while (GTK'…
ssfuisu 4363f0b
shm: measure the IPC_RMID grace period with the boot clock
ssfuisu 8d603dc
Merge branch state after 1.27.3
ssfuisu f7b7bbd
1.27.4: reload the custom terminal font when its file changes (#58)
ssfuisu 42e651b
Merge branch state after 1.27.4
ssfuisu 33acec7
Bug report: the desktop's state and its log
ssfuisu a4c9d50
1.27.5: XFCE runs (session bus, file type database, libpulse), PulseA…
ssfuisu 4980a6e
Review: loader order and relative paths in dlopen, recvmmsg, desktop …
ssfuisu 06734df
1.27.5.1: libraries' RUNPATH directories, locks on a memfd, fewer rea…
ssfuisu 853aed6
Review: memfd locks by the memfd's inode, RTLD_DEEPBIND, 32-bit names…
ssfuisu 1290602
32-bit: the headers already give these hooks their time64 names
ssfuisu 83c894e
Merge branch state after 1.27.5.1
ssfuisu 2c2e95c
1.27.6: selected text stays on the desktop, lstat keeps link sizes, r…
ssfuisu d056968
Review: /proc links are not kept, atomic cache fields, readlink of 0 …
ssfuisu b1f09da
Merge branch state after 1.27.6
ssfuisu b454569
Merge branch state after the README rewrite
ssfuisu dc8f670
Root mode: mount cgroups at /sys/fs/cgroup for container tools (#72)
ssfuisu 0adbb48
1.27.7: honest wording, build attestation, compat page, compare bench…
ssfuisu 248eb7a
Review: release tag at the built commit, publish only finished compat…
ssfuisu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Security | ||
|
|
||
| ## Reporting a problem | ||
|
|
||
| If you find a security problem in Cortex, please don't open a public issue. Write on [Telegram](https://t.me/ratzgn), or open an issue that only says you found something and we'll take it private from there. I'll answer within a few days and credit you in the changelog if you want. | ||
|
|
||
| ## What Cortex can and cannot do to your phone | ||
|
|
||
| **In normal mode Cortex is an ordinary Android app.** Everything it runs, `apt`, `gcc`, a server you start, runs as the app's own Android user, inside the app sandbox, with the same rights the terminal app itself has. Programs think they are root because the library answers "uid 0", but the kernel still sees the app's user. That means: | ||
|
|
||
| - It cannot change Android, the system partition, the bootloader or other apps' private data. It cannot brick the phone. A broken package can break Cortex's own Ubuntu, and clearing the app's data (or reinstalling it) gives you a fresh one. | ||
| - Uninstalling the app removes everything in its own storage. Nothing is left in the system. | ||
| - **Shared storage is the exception.** If you allow storage access, programs in Cortex can read, change and delete your files in `/sdcard` (photos, downloads, documents) just like a file manager can. A bad `rm` there is not undone by clearing data or uninstalling, and files programs create there stay after uninstalling. | ||
| - Ubuntu's files live in the app's private storage (`/data/data/org.cortex.terminal`), which other apps cannot read. Your phone's shared storage (`/sdcard`) is only reachable after you allow it. | ||
| - Packages come from Ubuntu's own mirrors and `apt` checks Ubuntu's signatures, the same as on a PC. Cortex ships Ubuntu's keyring and does not add any other package source. | ||
|
|
||
| **Root mode is different.** It only exists on phones you rooted yourself, only runs after you turn it on and your root manager (Magisk, KernelSU, APatch) asks you, and then sessions really are root. A root session can do anything root can do on Android. Each session gets its own mount namespace so its mounts don't leak into Android, but a root shell is a root shell: use it like you would `su`. | ||
|
|
||
| ## Permissions | ||
|
|
||
| | Permission | Why | | ||
| |---|---| | ||
| | `INTERNET`, `ACCESS_NETWORK_STATE` | `apt`, `git`, `curl` and every other network program. The app itself only talks to Ubuntu's mirrors (package lists and the fastest-mirror check) and to `api.github.com` (is there a new Cortex release). No analytics, no ads, no tracking. | | ||
| | `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_SPECIAL_USE`, `WAKE_LOCK` | Keeps your sessions running when the app is in the background, with the notification you see. The wake lock is only taken when you turn it on in that notification. | | ||
| | `POST_NOTIFICATIONS`, `VIBRATE` | The session notification, `notify-send` and `cortex-api` notifications, and the bell. | | ||
| | `READ_EXTERNAL_STORAGE`, `WRITE_EXTERNAL_STORAGE`, `MANAGE_EXTERNAL_STORAGE` | `/sdcard` in the terminal. The app asks once at the start; say *Later* and everything else works, only `/sdcard` stays closed. | | ||
| | `REQUEST_INSTALL_PACKAGES` | The in-app updater installs a newer Cortex APK, after you tap it. | | ||
|
|
||
| Cortex has no accessibility service, reads no contacts, SMS, location, camera or microphone, and the Files app entry only shows the Cortex home folder to the system file picker. | ||
|
|
||
| ## Checking a download | ||
|
|
||
| From 1.27.7 on, every release is built on GitHub's servers from the tagged source and comes with a build attestation and `SHA256SUMS.txt`. How to check both, and the signing key fingerprints, is in [signing/README.md](signing/README.md). The code is all here: the library that does the path mapping is [`app/src/main/cpp/hook`](app/src/main/cpp/hook), the root mode helper is [`app/src/main/cpp/root/cortex-chroot.c`](app/src/main/cpp/root/cortex-chroot.c). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.