5ec1cff
62ef18b560
kernel: clear securebits ( #2387 )
...
Build Kernel - ChromeOS ARCVM / Build ChromeOS ARCVM kernel (arm64, build.config.gki.aarch64, arm64_arcvm_defconfig, Image) (push) Has been cancelled
Build Kernel - ChromeOS ARCVM / Build ChromeOS ARCVM kernel (x86_64, build.config.gki.x86_64, x86_64_arcvm_defconfig, bzImage) (push) Has been cancelled
Build Kernel - AVD / build-kernel (aarch64, android-15-avd_aarch64.xml, android-15-avd_aarch64) (push) Has been cancelled
Build Kernel - AVD / build-kernel (x86_64, android-14-avd_x86_64.xml, android-14-avd_x86_64) (push) Has been cancelled
Build Kernel - AVD / build-kernel (x86_64, android-15-avd_x86_64.xml, android-15-avd_x86_64) (push) Has been cancelled
Build Kernel - WSA / build (arm64, 5.15.104.1) (push) Has been cancelled
Build Kernel - WSA / build (arm64, 5.15.104.2) (push) Has been cancelled
Build Kernel - WSA / build (arm64, 5.15.104.3) (push) Has been cancelled
Build Kernel - WSA / build (arm64, 5.15.104.4) (push) Has been cancelled
Build Kernel - WSA / build (arm64, 5.15.94.2) (push) Has been cancelled
Build Kernel - WSA / build (x86_64, 5.15.104.1) (push) Has been cancelled
Build Kernel - WSA / build (x86_64, 5.15.104.2) (push) Has been cancelled
Build Kernel - WSA / build (x86_64, 5.15.104.3) (push) Has been cancelled
Build Kernel - WSA / build (x86_64, 5.15.104.4) (push) Has been cancelled
Build Kernel - WSA / build (x86_64, 5.15.94.2) (push) Has been cancelled
Build Kernel - WSA / check_build (arm64) (push) Has been cancelled
Build Kernel - WSA / check_build (x86_64) (push) Has been cancelled
Build Manager / build-lkm (push) Has been cancelled
Build Kernel - Android 12 / upload-artifacts (push) Has been cancelled
Build Kernel - Android 13 / upload-artifacts (push) Has been cancelled
Build Kernel - Android 14 / upload-artifacts (push) Has been cancelled
Build Kernel - Android 15 / upload-artifacts (push) Has been cancelled
Build Manager / build-ksud (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
Build Manager / build-ksud (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, aarch64-linux-android) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, aarch64-unknown-linux-musl) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, x86_64-linux-android) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, x86_64-pc-windows-gnu) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, x86_64-unknown-linux-musl) (push) Has been cancelled
Build Manager / build-manager (push) Has been cancelled
fix adb shell cannot escape to root after #2381
2025-01-28 19:02:14 +08:00
Wang Han
7a71da057e
Clean up umount targets ( #2386 )
Build Kernel - Android 15 / build-kernel (2024-11, 56, 6.6) (push) Waiting to run
Build Kernel - Android 15 / build-kernel (2024-12, 57, 6.6) (push) Waiting to run
Build Kernel - Android 15 / upload-artifacts (push) Blocked by required conditions
Build Kernel - Android 15 / check-build-kernel (2024-12, 57, 6.6) (push) Waiting to run
Build Kernel - ChromeOS ARCVM / Build ChromeOS ARCVM kernel (arm64, build.config.gki.aarch64, arm64_arcvm_defconfig, Image) (push) Waiting to run
Build Kernel - ChromeOS ARCVM / Build ChromeOS ARCVM kernel (x86_64, build.config.gki.x86_64, x86_64_arcvm_defconfig, bzImage) (push) Waiting to run
Build Kernel - AVD / build-kernel (aarch64, android-15-avd_aarch64.xml, android-15-avd_aarch64) (push) Waiting to run
Build Kernel - AVD / build-kernel (x86_64, android-14-avd_x86_64.xml, android-14-avd_x86_64) (push) Waiting to run
Build Kernel - AVD / build-kernel (x86_64, android-15-avd_x86_64.xml, android-15-avd_x86_64) (push) Waiting to run
Build Kernel - WSA / build (arm64, 5.15.104.1) (push) Waiting to run
Build Kernel - WSA / build (arm64, 5.15.104.2) (push) Waiting to run
Build Kernel - WSA / build (arm64, 5.15.104.3) (push) Waiting to run
Build Kernel - WSA / build (arm64, 5.15.104.4) (push) Waiting to run
Build Kernel - WSA / build (arm64, 5.15.94.2) (push) Waiting to run
Build Kernel - WSA / build (x86_64, 5.15.104.1) (push) Waiting to run
Build Kernel - WSA / build (x86_64, 5.15.104.2) (push) Waiting to run
Build Kernel - WSA / build (x86_64, 5.15.104.3) (push) Waiting to run
Build Kernel - WSA / build (x86_64, 5.15.104.4) (push) Waiting to run
Build Kernel - WSA / build (x86_64, 5.15.94.2) (push) Waiting to run
Build Kernel - WSA / check_build (arm64) (push) Waiting to run
Build Kernel - WSA / check_build (x86_64) (push) Waiting to run
Build Manager / build-lkm (push) Waiting to run
Build Manager / build-ksud (macos-latest, aarch64-apple-darwin) (push) Blocked by required conditions
Build Manager / build-ksud (macos-latest, x86_64-apple-darwin) (push) Blocked by required conditions
Build Manager / build-ksud (ubuntu-latest, aarch64-linux-android) (push) Blocked by required conditions
Build Manager / build-ksud (ubuntu-latest, aarch64-unknown-linux-musl) (push) Blocked by required conditions
Build Manager / build-ksud (ubuntu-latest, x86_64-linux-android) (push) Blocked by required conditions
Build Manager / build-ksud (ubuntu-latest, x86_64-pc-windows-gnu) (push) Blocked by required conditions
Build Manager / build-ksud (ubuntu-latest, x86_64-unknown-linux-musl) (push) Blocked by required conditions
Build Manager / build-manager (push) Blocked by required conditions
2025-01-27 19:35:33 +08:00
Wang Han
38640ee4a6
Avoid unnecessarily overriding capabilities ( #2381 )
...
Previously all capabilities were overridden with 0xffffffffffffffff,
which is
not what normal processes have. This causes PR_CAPBSET_DROP prctl
fail because it is dropping invalid caps. Fix it.
This fixes
https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app/-/issues/378 .
Co-Authored-By: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
2025-01-25 17:29:08 +08:00
SsageParuders
58ed786c43
Improve seccomp disable && Add locking to protect cred modifications in escape_to_root ( #2320 )
...
- When disabling Seccomp, ensure that current->sighand->siglock is held
during the operation.
- Locking to ensure safe access and modification of the `cred` structure
within the `escape_to_root` function.
---
I think this issue described in #2236 may have been caused by concurrent
read-write access without proper locking.
---------
Signed-off-by: SsageParuders<qinqingqing1025@gmail.com>
Signed-off-by: SsageParuders <qinqingqing1025@gmail.com>"
2024-12-28 13:33:21 +08:00
Huy Minh
27bb2491c2
kernel: Relax dentry_path_raw compare in core_hook ( #2041 )
...
On Android-x86 (or BlissOS) it initialize Android by using switch_root
or chroot, when checking a path with dentry_path_raw() it will show the
whole real path instead of the path that we want.
Relax the checking requirement by using strstr to look for
"/system/packages.list" in the string instead of requiring the path to
be "/system/packages.list"
This fixes #1783
Signed-off-by: hmtheboy154 <buingoc67@gmail.com>
2024-09-07 10:59:06 +08:00
Ylarod
898e9d4f8c
[1.0] Drop Non-GKI Support ( #1483 )
...
Co-authored-by: weishu <twsxtd@gmail.com>
2024-06-01 14:50:46 +08:00
weishu
0576495b4b
kernel: Allow to use in Private Space
2024-05-16 12:03:58 +08:00
weishu
efbc07fde3
kernel: use library import
2024-04-27 09:55:24 +08:00
weishu
f982683825
kernel: refactor PR_REAL_REGS
2024-04-26 13:25:29 +08:00
D8G Official
444574739c
Fix missing semicolon ( #1551 )
...
Fix build non gki kernel
2024-03-28 20:22:00 +08:00
Coconut
4f05fe226e
kernel:Add Huawei hisi check ( #1545 )
...
Use huawei_hisi_check.h to determine whether it is an old Huawei
HiSilicon device.
Solve:
1. Compatible with non-GKI Huawei HiSilicon devices
2. Solve different bugs in EMUI of different system versions
3. Does not affect other devices
2024-03-28 14:20:00 +08:00
weishu
4ac203a78d
kernel: Fix misleading log
2024-03-27 17:29:03 +08:00
Jprimero15
cb7f414e39
kernel: guard "umount for uid" logprint with CONFIG_KSU_DEBUG ( #1519 )
...
Its too spammy to be on non-debug mode.
2024-03-24 21:42:23 +08:00
weishu
858ec910fd
kernel: clean memory when exit
2024-03-24 16:41:53 +08:00
weishu
dc5f911e43
kernel: remove become_manager and minor refactors
2024-03-24 11:20:43 +08:00
weishu
e1f9900b2f
kernel: simplify prctl
2024-03-23 23:11:47 +08:00
weishu
9a04211051
kernel: Let the kernel choose who is qualified to be the manager.
2024-03-23 21:48:03 +08:00
weishu
b3a15e2b6b
kernel: Fix the incorrect judgment condition.
2024-03-21 11:48:02 +08:00
weishu
c5d423c4eb
kernel: ignore all non application uid
2024-03-21 11:45:44 +08:00
weishu
64908583e9
kernel: Fix compile warning
2024-03-21 11:32:30 +08:00
weishu
c408710b11
kernel: minor fixes
2024-03-21 11:24:56 +08:00
backslashxx
247aa877e4
fixup! Suggest non-gki kernel users to backport path_umount ( #1477 )
...
My bad.
as reported by @AzusaHana on tg

2024-03-19 15:39:54 +08:00
weishu
ce0c397a65
kernel: support query working mode
2024-03-19 11:52:17 +08:00
backslashxx
b4cfc2f298
Suggest non-gki kernel users to backport path_umount ( #1464 )
...
Most kernel builders have to touch their kernel source code anyway, why
not also tell them to backport path_umount so even non-gki users can
benefit from this?
I know this might be a bit controversial as this will raise the barrier
of entry, but the benefits are just so high.
Idea was from OnlyTomInSecond on KernelSU group chat way back, and it
has been on the discussions for some time
references:
https://t.me/KernelSU_group/27237/176515
https://t.me/KernelSU_group/3249/184908
https://github.com/tiann/KernelSU/discussions/955#discussioncomment-7617166
03d233db8b
https://github.com/tiann/KernelSU/pull/1060
https://elixir.bootlin.com/linux/v5.9.1/source/fs/namespace.c#L1728
https://elixir.bootlin.com/linux/v5.10.9/source/fs/namespace.c#L1730
https://elixir.bootlin.com/linux/v6.5/source/fs/namespace.c#L1887
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002492107
Kernel side change examples
5.4
961d978862
4.19
164917f56d
4.14
c07c70a0c5
4.9
195f07593a
4.4
21ea33fe41
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002424069
ofcourse having someone on 3.18 confirm this will be nice.
**PROS**: umount modules for everyone
**CONS**: barrier of entry +1
---------
Co-authored-by: Christoph Hellwig <hch@lst.de>
Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com>
Co-authored-by: Tom <31297720+onlytominsecond@users.noreply.github.com>
2024-03-18 10:27:31 +08:00
Ylarod
7568d55be1
Build KernelSU as LKM ( #1254 )
...
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-15 18:53:24 +08:00
Wang Han
3e2de84a81
Guard a few logprint in prctl path with KSU_DEBUG ( #1402 )
2024-02-29 13:47:22 +08:00
weishu
07e475c5dc
kernel: prevent become manager when failed. close #1328
2024-02-03 20:03:26 +08:00
weishu
e9997a07c1
kernel: avoding umount when there isn't any module. close #556
2024-01-08 12:55:08 +08:00
Ylarod
e3e4d2eed4
Try umount /sbin
in kernel ( #1257 )
2024-01-06 08:59:30 +08:00
Nullptr
706cd1e73e
Mount temp dir at /debug_ramdisk ( #1226 )
2023-12-23 21:05:26 +08:00
weishu
344c08bb79
kernel: make compiler happy
2023-10-21 22:43:58 +08:00
weishu
75b5fdfb9d
kernel: make su without any capabilities possible
2023-10-21 20:32:28 +08:00
weishu
ce892bc439
kernel: don't umount for non zygote child process. fixes #1054,#1049,#1045
2023-10-19 17:29:10 +08:00
weishu
79951f06ed
kernel: ignore path that's not mountpoint
2023-10-12 14:24:41 +08:00
weishu
7747c0e211
kernel: umount modules mnt when needed. fix #991
2023-10-08 14:17:33 +08:00
longhuan1999
54ee400dc5
kernel: Adapt to low version Android init process ( #973 )
...
1. Adapt to low version Android init process
2. Add stop hook output
3. Fix output with missing line breaks
2023-10-02 12:00:24 +08:00
weishu
cde3e95180
kernel: Fix manager recognize err
2023-08-09 16:28:22 +08:00
weishu
beaa048be3
kernel: don't trigger page fault when become manager. fix #836
2023-08-09 12:33:05 +08:00
4qwerty7
f4d2b0feab
Distinguish different PT_REGS_PARM4 under x86 ( #711 )
...
1. `PT_REGS_CCALL_PARM4` 表示存放C调用约定的第4个参数的寄存器
2. `PT_REGS_SYSCALL_PARM4` 表示存放linux syscall调用约定的第4个参数的寄存器
3. 将原有 `PT_REGS_PARM4` 改为上述之一
4. 将原有 `ksu_handle_execveat_ksud` 和 `ksu_handle_execveat_sucompat` 可能被
kprobe 传递错误实参、且不使用的形参标记为 never_used 并传递 `NULL`
5. 为 `ksu_handle_execveat_ksud` 提供正确的 argv 参数用以在 x86 下也能正确识别 `init
second_stage`
---------
Co-authored-by: weishu <twsxtd@gmail.com>
2023-07-06 09:01:35 +08:00
weishu
f5cfb32882
kernel: fix incorrect umount for apps
2023-06-22 15:17:32 +08:00
weishu
08884da423
kernel: don't alloc groups for default groups
2023-06-22 13:42:28 +08:00
weishu
5f1d70dabb
Revert "kernel: getname might sleep in kprobe handler ( #670 )"
...
This reverts commit 79bb9813efbb8e56bdf9fc2a64088f40f2425faf.
2023-06-22 12:54:30 +08:00
weishu
79bb9813ef
kernel: getname might sleep in kprobe handler ( #670 )
2023-06-22 10:54:50 +08:00
Fiqri Ardyansyah
4218aa488f
Fix error build when using GCC 12.0.0 ( #609 )
...
Signed-off-by: Fiqri Ardyansyah <fiqri0927936@gmail.com>
2023-06-09 10:35:16 +08:00
weishu
1408175a35
kernel: fix set groups for kernel 4.9-
2023-06-06 20:45:42 +08:00
weishu
53be8612c8
kernel: support setting selinux context for profile
2023-06-06 16:35:25 +08:00
weishu
c7f6a7d11b
kernel: support settings supplementary groups for profile
2023-06-06 13:19:11 +08:00
weishu
710edb72fa
kernel: prevent root process to exec su, which makes app can escape root profile by exec it twice
2023-06-06 11:08:57 +08:00
weishu
076e5d3655
kernel: make the profile uid, gid, capabilities really work
2023-06-04 17:29:12 +08:00
weishu
fc77ca989f
kernel: use uid instead of package to compare allowlist, fix #580
2023-06-04 09:18:39 +08:00