feat(soter): sepolicy grants for ptrace injection
Injection into the soterserver app (platform_app domain, per recon) needs ptrace under SELinux enforcing. Add the grant mirroring the keystore one, in the base rule so it applies to both variants: allow crash_dump platform_app process * The per-UID NDJSON write grant is debug-only: appended for debug builds in build.gradle.kts's isDebug doLast, mirroring the existing keystore media_rw_data_file grant. Keeping it out of the base rule stops an external-storage write from leaking into release. No soter_server SELinux type exists; platform_app is the soterserver app domain. Runtime policy (KSU/magiskpolicy) grants this past the compile-time neverallow; on-device avc verification is 10.V. Checkpoint 10.C.
This commit is contained in:
@@ -224,10 +224,14 @@ androidComponents {
|
||||
|
||||
if (isDebug) {
|
||||
doLast {
|
||||
// Debug-only: grant the keystore domain external-storage access; diag.sh
|
||||
// (shipped only in debug) carries the shell side of the diagnostic plane.
|
||||
// Debug-only: grant the keystore + soterserver (platform_app) domains
|
||||
// external-storage access for the per-UID NDJSON sink. diag.sh (shipped
|
||||
// only in debug) carries the shell side of the diagnostic plane.
|
||||
tempModuleDir.get().asFile.resolve("sepolicy.rule")
|
||||
.appendText("\nallow keystore media_rw_data_file { dir file } *\n")
|
||||
.appendText(
|
||||
"\nallow keystore media_rw_data_file { dir file } *" +
|
||||
"\nallow platform_app media_rw_data_file { dir file } *\n",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user