Skip to content
Snippets Groups Projects
Commit ea0c294c authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Add no_x_file_perm to property related files.

It doesn't ever make sense to attempt to load executable code
from these files. Add a neverallow rule (compile time assertion and
CTS test).

Bug: 27882507

(cherry picked from commit 50ba6318)

Change-Id: Ifab6e46a077a87629b4d3c7ada1050f2ab6931d5
parent 24a7f167
No related branches found
No related tags found
No related merge requests found
......@@ -304,10 +304,10 @@ neverallow { domain userdebug_or_eng(`-shell') } nativetest_data_file:file no_x_
# Only the init property service should write to /data/property and /dev/__properties__
neverallow { domain -init } property_data_file:dir no_w_dir_perms;
neverallow { domain -init } property_data_file:file no_w_file_perms;
neverallow { domain -init } property_type:file no_w_file_perms;
neverallow { domain -init } properties_device:file no_w_file_perms;
neverallow { domain -init } properties_serial:file no_w_file_perms;
neverallow { domain -init } property_data_file:file { no_w_file_perms no_x_file_perms };
neverallow { domain -init } property_type:file { no_w_file_perms no_x_file_perms };
neverallow { domain -init } properties_device:file { no_w_file_perms no_x_file_perms };
neverallow { domain -init } properties_serial:file { no_w_file_perms no_x_file_perms };
# Only recovery should be doing writes to /system
neverallow { domain -recovery } { system_file exec_type }:dir_file_class_set
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment