mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
27d8bc458fc86f352b148b78def88a16618306bb
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>
English | 简体中文 | 繁體中文 | Türkçe | Português (Brasil) | 한국어 | Français | Bahasa Indonesia | Русский | ภาษาไทย | Tiếng Việt | Italiano | Polski | Български | 日本語
KernelSU Next
A kernel-based root solution for Android devices.
Features
- Kernel-based
suand root access management. - Module system based on dynamic mount system Magic Mount / OverlayFS.
- App Profile: Lock up the root power in a cage.
Compatibility state
KernelSU Next officially supports most Android kernels starting from 4.4 up to 6.6.
- GKI 2.0 (5.10+) kernels can run pre-built images and LKM/KMI.
- GKI 1.0 (4.19 - 5.4) kernels need to rebuilt with KernelSU driver.
- EOL (<4.14) kernels also need to be rebuilt with KernelSU driver (3.18+ is experimental and may need some function backports).
Currently, only the arm64-v8a architecture is supported.
Usage
Security
For information on reporting security vulnerabilities in KernelSU, see SECURITY.md.
License
- Files under the
kerneldirectory are GPL-2.0-only. - All other parts except the
kerneldirectory are GPL-3.0-or-later.
Donations
-
0x12b5224b7aca0121c2f003240a901e1d064371c1 [ USDT BEP20 ]
-
TYUVMWGTcnR5svnDoX85DWHyqUAeyQcdjh [ USDT TRC20 ]
-
0x12b5224b7aca0121c2f003240a901e1d064371c1 [ USDT ERC20 ]
-
0x12b5224b7aca0121c2f003240a901e1d064371c1 [ ETH ERC20 ]
-
Ld238uYBuRQdZB5YwdbkuU6ektBAAUByoL [ LTC ]
-
19QgifcjMjSr1wB2DJcea5cxitvWVcXMT6 [ BTC ]
Credits
- Kernel-Assisted Superuser: The KernelSU idea.
- Magisk: The powerful root tool.
- genuine: APK v2 signature validation.
- Diamorphine: Some rootkit skills.
- KernelSU: Thanks to tiann, or else KernelSU Next wouldn't even exist.
- Magic Mount Port: 💜 5ec1cff for saving KernelSU!
v1.0.8
Latest
Languages
Kotlin
44%
Rust
29.4%
C
16.5%
Java
4.4%
Shell
2.9%
Other
2.7%