2623 Commits

Author SHA1 Message Date
rifsxd
324d09a61e manager: added MINIMAL_SUPPORTED_HOOK_MODE and hook_mode info 2025-05-21 18:07:47 +06:00
rifsxd
d5dfecefea Revert "kernel: Makefile: sanity checks"
This reverts commit 26d3ec14a6.
2025-05-21 18:07:46 +06:00
rifsxd
ce37e17c87 kernel: added CMD_HOOK_MODE prctl to get the enabled su hook mode value 2025-05-21 18:07:41 +06:00
rifsxd
3b1d5f15f4 manager: webuix no longer should be stated beta as it is stable enough for release 2025-05-21 15:18:01 +06:00
rifsxd
714ec4695b manager: show home_failure instead of lkm_mode_deprecated 2025-05-21 15:16:37 +06:00
rifsxd
3795d92d7a manager: fix kprobes strings 2025-05-21 15:15:27 +06:00
rifsxd
eed685507a kernel: rename KSU_WITH_KPROBES to KSU_KPROBES_HOOK for better self explanitory 2025-05-21 15:13:17 +06:00
backslashxx
26d3ec14a6 kernel: Makefile: sanity checks 2025-05-21 15:09:33 +06:00
ShirkNeko
96d475407a Add a formatting string for the update list #2556 (#2597)
Fix module update failures caused by spaces and other non Linux readable
characters


Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-05-21 15:03:06 +06:00
backslashxx
27d8bc458f kernel: sucompat: increase reliability of execve_sucompat
On plain ARMv8.0 devices (A53,A57,A73), strncpy_from_user_nofault() sometimes
fails to copy `filename_user` string correctly. This breaks su ofc, breaking
some apps like Termux (Play Store ver), ZArchiver and Root Explorer.

This does NOT seem to affect newer ARMv8.2+ CPUs (A75/A76 and newer)

My speculation? ARMv8.0 has weak speculation :)

here we replace `strncpy_from_user_nofault()` with another routine:
 - access_ok() to validate the pointer
 - strncpy_from_user() to copy and validate string
 - manual null-termination just in case, as strncpy_from_user_nofault also does it
 - remove that memset, seems useless as it is an strncpy, not strncat

Kind of mimicking _nofault, but yes with this one we allow pagefaults.

Tested on:
- ARMv8.0 A73.a53, A57.a53, A53.a53
- ARMv8.2 A76.a55

Tested-by: iDead XD <rafifirdaus12bb@gmail.com>
Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-21 15:01:01 +06:00
Der_Googler
519f86c47e manager: refactor label item in superuser list (#403) 2025-05-19 22:50:11 +06:00
backslashxx
980f71c1bd kernel: core_hook: fixup 217d230b (#402)
Reported-by: Trijal Saha <97483939+Trijal08@users.noreply.github.com>
2025-05-19 22:49:44 +06:00
Rifat Azad
7692665428 manager: warn about LKM mode deprecation for GKI2 kernels 2025-05-19 00:07:05 +06:00
Trijal Saha
aaca0b5283 ci: Only have one task for susfsd irrespective of the target architecture (#395) 2025-05-18 22:49:39 +06:00
Der_Googler
e5a495489d Improve StatusCard and fix WX wrappers of WebUI X (#393)
* manager: bump mmrl to 1998c70b77

* manager: improve StatusCard
2025-05-18 22:11:38 +06:00
Der_Googler
e07a6fb3ff manager: Bump MMRL and possible fix #384 (#391)
* manager: bump mmrl to 346470abb8

- Possible fix a bug where IUserManager.getUsers(ZZZ) are not defined in the framework.jar
- Refactored WebUI X to meet the new WXInterface
- Only fetch the app from the current user and not all users

* manager: remove unused AIDL interfaces
2025-05-18 16:50:51 +06:00
Rifat Azad
b8c2660996 manager: add ABI info icon 2025-05-18 12:30:20 +06:00
rifsxd
ec2ecdcacb manager: fix unresolved referance 2025-05-18 12:22:34 +06:00
rifsxd
3c3ab77f65 manager: Add ABI archirecture info for manager 2025-05-18 12:09:08 +06:00
rifsxd
ffb2c89c36 manager: add kernel ABI info 2025-05-18 12:03:49 +06:00
rifsxd
bda62cc8a1 manager: refine working mode designation 2025-05-18 11:54:41 +06:00
Wang Han
a052af4180 Fix fallback option for createRootShell() (#2593) 2025-05-18 11:30:47 +06:00
rifsxd
8835c37536 ksud_magic: Update zip-extensions and set needed features for zip
zip-extensions does not export time and deflate64 features now.
2025-05-18 11:29:58 +06:00
Wang Han
69f3c9f6ab Update zip-extensions and set needed features for zip (#2592)
zip-extensions does not export time and deflate64 features now.
2025-05-18 11:25:38 +06:00
Rifat Azad
af3e0bd6a5 ci: fux ksud armv7a artifact download 2025-05-18 10:40:31 +06:00
Rifat Azad
5b14512323 ci: fux susfsd artifact download 2025-05-18 10:32:41 +06:00
Rifat Azad
6f176ad1c4 ksud_magic: removed loopdev 2025-05-18 10:24:39 +06:00
Rifat Azad
bc9d720a3c ksud_overlayfs: use upstream loopdev 2025-05-18 10:18:35 +06:00
Rifat Azad
93c5013251 ksud_overlayfs: use upstream hole-punch 2025-05-18 10:01:05 +06:00
Rifat Azad
bc5c993093 manager: added armv7a abi 2025-05-18 09:14:14 +06:00
Rifat Azad
759b3c5baf ci: fix workflow 2025-05-18 04:10:23 +06:00
Rifat Azad
e1303d13a3 ci: fix duplicate susfsd artifact upload error 2025-05-18 04:05:50 +06:00
Rifat Azad
8824115697 ci: upload armv7a susfsd artifact 2025-05-18 03:57:09 +06:00
Rifat Azad
a78a1e7d2e ci: fixed syntax error 2025-05-18 03:49:41 +06:00
backslashxx
9e150b2c44 ksud/installer: /odm handling
we move the folder out of system if it exists in real filesystem and it
is not a symlink.
this is already supported on init_event.rs so only handle_partition
logic was needed to make it happen

since KernelSU is using overlayfs, we need to move these out.

Signed-off-by: backslashxx
<118538522+backslashxx@users.noreply.github.com>

---------

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-18 03:42:32 +06:00
backslashxx
217d230b61 kernel: expose KSU_LSM_SECURITY_HOOKS on Kconfig
disabling this removes the need for LSM_HOOK_INIT, security_add_hooks and such,.
furthermore, this will also allow easier integration on pre-4.1 kernels.
Expose this and make it a configurable option.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-18 03:23:12 +06:00
backslashxx
ba1b3c4fc7 kernel/throne_tracker: we just uninstalled the manager, stop looking for it
When the manager UID disappears from packages.list, we correctly
invalidate it — good. But, in the very next breath, we start scanning
/data/app hoping to find it again?

This event is just unnecessary I/O, exactly when we should be doing less.
Apparently this causes hangups and stuckups which is REALLY noticeable
on Ultra-Legacy devices.

Skip the scan — we’ll catch the reinstall next time packages.list updates.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-18 03:23:12 +06:00
backslashxx
5f871cd713 kernel/selinux: fix pointer mismatch with 32-bit ksud on 64-bit kernels
Since KernelSU Manager can now be built for 32-bit, theres this problematic
setup where userspace is 32-bit (armeabi-v7a) and kernel is 64bit (aarch64).

On 64-bit kernels with CONFIG_COMPAT=y, 32-bit userspace passes 32-bit pointers.
These values are interpreted as 64-bit pointers without proper casting and that
results in invalid or near-null memory access.

This patch adds proper compat-mode handling with the ff changes:
- introduce a dedicated struct (`sepol_compat_data`) using u32 fields
- use `compat_ptr()` to safely convert 32-bit user pointers to kernel pointers
- adding a runtime `ksu_is_compat` flag to dynamically select between struct layouts

This prevents a near-null pointer dereference when handling SELinux
policy updates from 32-bit ksud in a 64-bit kernel.

Truth table:

kernel 32 + ksud 32, struct is u32, no compat_ptr
kernel 64 + ksud 32, struct is u32, yes compat_ptr
kernel 64 + ksud 64, struct is u64, no compat_ptr

Preprocessor check

64BIT=y COMPAT=y: define both structs, select dynamically
64BIT=y COMPAT=n: struct u64
64BIT=n: struct u32

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-05-18 03:23:12 +06:00
backslashxx
4a37422af5 kernel/sucompat: sync to KSU pr #2506
kernel: sucompat: sucompat toggle support for non-kp

This is done like how vfs_read_hook, input_hook and execve_hook is disabled.
While this is not exactly the same thing, this CAN achieve the same results.
The complete disabling of all KernelSU hooks.

While this is likely unneeded, It keeps feature parity to non-kprobe builds.

adapted from upstream:
	kernel: Allow to re-enable sucompat - 4593ae81c7

Rejected: https://github.com/tiann/KernelSU/pull/2506

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>

kernel: sucompat: fix compile issue on kprobe builds, unused variable
2025-05-18 03:23:12 +06:00
Rifat Azad
a081fc87c9 manager/userspace: added 32bit (armv7a) support 2025-05-18 03:19:50 +06:00
Rifat Azad
0e8286e195 manager: refactor working mode designation 2025-05-18 01:56:47 +06:00
Rifat Azad
e9d53c4084 manager: removed overlayfs check for modules screen
since magic_mount is the default mount system which most UL (ultra legacy) devices will depend on
2025-05-17 10:41:22 +06:00
Rifat Azad
697a0ac9fc issue_template: we don't accept features requests anymore 2025-05-13 10:14:34 +06:00
dependabot[bot]
7f12e1c19a build(deps): bump the crates group across 1 directory with 4 updates (#365)
Bumps the crates group with 4 updates in the /userspace/ksud_magic directory: rust-embed, [cc](https://github.com/rust-lang/cc-rs), [libm](https://github.com/rust-lang/compiler-builtins) and [tokio](https://github.com/tokio-rs/tokio).


Updates `rust-embed` from 8.7.0 to 8.7.1

Updates `cc` from 1.2.20 to 1.2.21
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.20...cc-v1.2.21)

Updates `libm` from 0.2.13 to 0.2.14
- [Release notes](https://github.com/rust-lang/compiler-builtins/releases)
- [Changelog](https://github.com/rust-lang/compiler-builtins/blob/master/.release-plz.toml)
- [Commits](https://github.com/rust-lang/compiler-builtins/compare/libm-v0.2.13...libm-v0.2.14)

Updates `tokio` from 1.44.2 to 1.45.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.2...tokio-1.45.0)

---
updated-dependencies:
- dependency-name: rust-embed
  dependency-version: 8.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: cc
  dependency-version: 1.2.21
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: libm
  dependency-version: 0.2.14
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: tokio
  dependency-version: 1.45.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: crates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 02:36:03 +06:00
dependabot[bot]
bf99cb50fd build(deps): bump the crates group across 1 directory with 4 updates (#364)
Bumps the crates group with 4 updates in the /userspace/ksud_overlayfs directory: rust-embed, [cc](https://github.com/rust-lang/cc-rs), [libm](https://github.com/rust-lang/compiler-builtins) and [tokio](https://github.com/tokio-rs/tokio).


Updates `rust-embed` from 8.7.0 to 8.7.1

Updates `cc` from 1.2.20 to 1.2.21
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.20...cc-v1.2.21)

Updates `libm` from 0.2.13 to 0.2.14
- [Release notes](https://github.com/rust-lang/compiler-builtins/releases)
- [Changelog](https://github.com/rust-lang/compiler-builtins/blob/master/.release-plz.toml)
- [Commits](https://github.com/rust-lang/compiler-builtins/compare/libm-v0.2.13...libm-v0.2.14)

Updates `tokio` from 1.44.2 to 1.45.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.2...tokio-1.45.0)

---
updated-dependencies:
- dependency-name: rust-embed
  dependency-version: 8.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: cc
  dependency-version: 1.2.21
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: libm
  dependency-version: 0.2.14
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: crates
- dependency-name: tokio
  dependency-version: 1.45.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: crates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 02:35:26 +06:00
dependabot[bot]
1333f0113f build(deps): bump the maven group in /manager with 2 updates (#349)
Bumps the maven group in /manager with 2 updates: [io.github.raamcosta.compose-destinations:core](https://github.com/raamcosta/compose-destinations) and [io.github.raamcosta.compose-destinations:ksp](https://github.com/raamcosta/compose-destinations).


Updates `io.github.raamcosta.compose-destinations:core` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/raamcosta/compose-destinations/releases)
- [Commits](https://github.com/raamcosta/compose-destinations/compare/2.1.0...2.1.1)

Updates `io.github.raamcosta.compose-destinations:ksp` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/raamcosta/compose-destinations/releases)
- [Commits](https://github.com/raamcosta/compose-destinations/compare/2.1.0...2.1.1)

Updates `io.github.raamcosta.compose-destinations:ksp` from 2.1.0 to 2.1.1
- [Release notes](https://github.com/raamcosta/compose-destinations/releases)
- [Commits](https://github.com/raamcosta/compose-destinations/compare/2.1.0...2.1.1)

---
updated-dependencies:
- dependency-name: io.github.raamcosta.compose-destinations:core
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: io.github.raamcosta.compose-destinations:ksp
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: io.github.raamcosta.compose-destinations:ksp
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-07 02:35:03 +06:00
igor
1b544bd22d Update Portuguese translation (#361) 2025-05-07 02:33:03 +06:00
mr_vokintos
24f514c949 Fixes for Russian translation (#358)
* Update README_RU.md

Donations added

* Update strings.xml

fix

* Update strings.xml

again

* Update README_RU.md

* Update Ru strings.xml

Fixes and additions

* Update README_RU.md

I didn't like the way it looked
2025-05-07 02:32:31 +06:00
Bachpooh
8eed26e0a1 manager: Update values-vi/strings.xml (#357)
* Corrects mistranslation
* Fix issues #335
2025-05-07 02:32:17 +06:00
luigimak
3c5b3f0a49 Update Italian translation (#355) 2025-05-07 02:32:03 +06:00