forked from LineageOS/android_device_google_wahoo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Device SELinux policy for secure persistent netd storage
This is used to persist RFC 7217 stable secrets across device reboots. For now this is device-specific; in future releases it will be moved to public sepolicy. Bug: 17613910 Test: stable_secret is generated on first use and persists across reboots Test: "adb shell getprop persist.netd.stable_secret" doesn't work after "adb unroot" Change-Id: I0a609c724799a15b1926e62534c16810d34f2275
- Loading branch information
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,10 @@ | ||
# TODO: delete this once it's in common sepolicy. | ||
set_prop(netd, netd_stable_secret_prop) | ||
|
||
# persist.netd.stable_secret contains RFC 7217 secret key which should never be | ||
# leaked to other processes. Make sure it never leaks. | ||
neverallow { domain -netd -init } netd_stable_secret_prop:file r_file_perms; | ||
|
||
# We want to ensure that no other process ever tries tampering with persist.netd.stable_secret, | ||
# the RFC 7217 secret key managed by netd. Doing so could compromise user privacy. | ||
neverallow { domain -netd -init } netd_stable_secret_prop:property_service set; |
This file contains 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,2 @@ | ||
# TODO: delete this once it's in common sepolicy. | ||
type netd_stable_secret_prop, property_type; |
This file contains 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,2 @@ | ||
# TODO: delete this once it's in common sepolicy. | ||
persist.netd.stable_secret u:object_r:netd_stable_secret_prop:s0 |