Commit graph

13287 commits

Author SHA1 Message Date
Jaekyun Seok
3f63d625b3 Merge "Add default namespaces of odm properties"
am: 74828e65d5

Change-Id: I1ba1400dbdfb7eebd0a40571cc65dec45f081d57
2018-01-19 00:05:35 +00:00
Treehugger Robot
74828e65d5 Merge "Add default namespaces of odm properties" 2018-01-18 23:11:09 +00:00
Tri Vo
2a29ebac10 Merge "system_server: remove access sysfs_devices_system_cpu"
am: 3ac8456fed

Change-Id: Ie724f09b937b2890f528592b3b5afea915ea7578
2018-01-18 20:36:51 +00:00
Tri Vo
3ac8456fed Merge "system_server: remove access sysfs_devices_system_cpu" 2018-01-18 20:26:30 +00:00
Jeff Vander Stoep
c25c474c2b Merge "Suppress denials for non-API access"
am: ec4d4a5ed3

Change-Id: I17d84198a6c0f5dfe556d5b688f9d92e5f2238b1
2018-01-18 20:10:36 +00:00
Treehugger Robot
ec4d4a5ed3 Merge "Suppress denials for non-API access" 2018-01-18 20:03:15 +00:00
Jeff Vander Stoep
6d8a876a4c Suppress denials for non-API access
avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
tcontext=u:object_r:proc_version:s0 tclass=file
avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
tcontext=u:object_r:wifi_prop:s0 tclass=file
avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
tcontext=u:object_r:net_dns_prop:s0 tclass=file

Bug: 72151306
Test: build
Change-Id: I4b658ccd128746356f635ca7955385a89609eea1
2018-01-18 08:55:02 -08:00
Jaekyun Seok
afca82a3bb Add default namespaces of odm properties
Since /odm is an extension of /vendor, its default property contexts
should be consistent with ones of /vendor.

Bug: 36796459
Test: tested on wahoo devices
Change-Id: Ia67ebe81e9c7102aab35a34f14738ed9a24811d3
2018-01-18 13:31:37 +09:00
Tri Vo
2a415167a4 Merge "storaged: remove access to sysfs_type"
am: e3b05cf614

Change-Id: I4476416827118b2765279515ff58bf6e871b9bd3
2018-01-18 02:18:21 +00:00
Tri Vo
6029d32912 Merge "Mark shell as system_executes_vendor_violators."
am: 65565c1cfd

Change-Id: I8b5123d574282c5167dfdcd3b259bb6a89373716
2018-01-18 02:18:01 +00:00
Chenbo Feng
6b2a01a651 Add sepolicy to lock down bpf access
am: 566411edf2

Change-Id: I214a6d7de6ca01a3daf487bcfe9c5c99d9f11eff
2018-01-18 02:17:41 +00:00
Treehugger Robot
e3b05cf614 Merge "storaged: remove access to sysfs_type" 2018-01-18 01:25:42 +00:00
Andy Hung
9709a69aa7 dumpstate: add media.metrics
am: 8b049d5b6f

Change-Id: I9d73b994d345c21579f95ce2edd17a8025e113f0
2018-01-17 23:55:45 +00:00
Tri Vo
65565c1cfd Merge "Mark shell as system_executes_vendor_violators." 2018-01-17 23:46:22 +00:00
Chenbo Feng
566411edf2 Add sepolicy to lock down bpf access
Add a new set of sepolicy for the process that only netd use to load
and run ebpf programs. It is the only process that can load eBPF
programs into the kernel and is only used to do that. Add some
neverallow rules regarding which processes have access to bpf objects.

Test: program successfully loaded and pinned at sys/fs/bpf after device
boot. No selinux violation for bpfloader
Bug: 30950746

Change-Id: Ia6bb1afda29ae0749bdc368e2dfc5faa12e81b2f
2018-01-17 23:19:30 +00:00
Tri Vo
35c65c1e01 system_server: remove access sysfs_devices_system_cpu
CpuFrequency.java seems to be the only thing that depends on
/sys/devices/system/cpu in system_server. And according to
b/68988722#comment15, that dependency is not exercised.

Bug: 68988722
Test: walleye boots without denials to sysfs_devices_system_cpu
Change-Id: If777b716bf74188581327b7f5aa709f5d88aad2d
2018-01-17 21:02:06 +00:00
Tri Vo
30a3157003 Mark shell as system_executes_vendor_violators.
Bug: 62041836
Test: sailfish sepolicy builds

Change-Id: Iad865fea852ab134dd848688e8870bc71f99788d
2018-01-17 09:39:22 -08:00
Andy Hung
8b049d5b6f dumpstate: add media.metrics
Test: adb bugreport
Bug: 71483452
Change-Id: Ibd98702c1f757f17ada61a906ae4e0ec750aac79
2018-01-17 09:36:20 -08:00
Yang Ni
d47b8e2440 Merge "Allow applications to use NN API HAL services"
am: 1642d4059a

Change-Id: I2910c5b5d662d8701975af271ab8a973dd4ca52f
2018-01-17 16:44:49 +00:00
Yang Ni
1642d4059a Merge "Allow applications to use NN API HAL services" 2018-01-17 16:34:16 +00:00
Jeffrey Vander Stoep
d3918def64 Merge "Annotate denials"
am: 66024968e9

Change-Id: I489014ba95963284697c6e8e2d3017efda6f1ff1
2018-01-17 06:27:47 +00:00
Jeffrey Vander Stoep
66024968e9 Merge "Annotate denials" 2018-01-17 06:23:27 +00:00
Jaekyun Seok
d90c40a636 Merge "Fix TODOs of duplicate property names for prefix and exact matching"
am: 1757417211

Change-Id: Ic64a438df9e5809df97bd1fa0a9bb20fb2e9edcc
2018-01-17 05:41:57 +00:00
Treehugger Robot
1757417211 Merge "Fix TODOs of duplicate property names for prefix and exact matching" 2018-01-17 05:35:55 +00:00
Andreas Gampe
5c8c3cd9e7 Merge "Sepolicy: Allow perfprofd to contact dropbox"
am: 163fc775a6

Change-Id: I4473586709d8a15a23b4fe58713d7777af0b55c6
2018-01-17 04:00:48 +00:00
Treehugger Robot
163fc775a6 Merge "Sepolicy: Allow perfprofd to contact dropbox" 2018-01-17 03:57:07 +00:00
Jeff Vander Stoep
1e1a3f7c58 Annotate denials
There is a race condition between when /data is mounted
and when processes attempt to access it. Attempting to access
/data before it's mounted causes an selinux denial. Attribute
these denials to a bug.

07-04 23:48:53.646   503   503 I auditd  : type=1400 audit(0.0:7): avc:
denied { search } for comm="surfaceflinger" name="/" dev="sda35" ino=2
scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:unlabeled:s0
tclass=dir permissive=0
07-15 17:41:18.100   582   582 I auditd  : type=1400 audit(0.0:4): avc:
denied { search } for comm="BootAnimation" name="/" dev="sda35" ino=2
scontext=u:r:bootanim:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir
permissive=0

Bug: 68864350
Test: build
Change-Id: I07f751d54b854bdc72f3e5166442a5e21b3a9bf5
2018-01-16 19:47:36 -08:00
Tri Vo
48027a0067 storaged: remove access to sysfs_type
Bug: 68388678
Test: storaged-unit-tests
Change-Id: Iea1ba0131a389dc4396ff3ebe2cdf68dbd688c8a
2018-01-16 18:39:29 -08:00
Jaekyun Seok
f9d27887eb Fix TODOs of duplicate property names for prefix and exact matching
Duplicate property names are supported now for prefix and exact
matching.

Bug: 38146102
Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
Change-Id: Ifd9d32eaece7370d69f121e88d5541f7a2e34458
2018-01-16 22:41:04 +00:00
Tri Vo
51ba2a7542 Merge "Files under /vendor must have attribute vendor_file_type."
am: 97753529fd

Change-Id: I3909035ef1ef9b94049b9cb35066b5a0f19289e9
2018-01-16 22:09:08 +00:00
Treehugger Robot
97753529fd Merge "Files under /vendor must have attribute vendor_file_type." 2018-01-16 21:52:50 +00:00
Michael Butler
ea331aa7b8 Allow applications to use NN API HAL services
The NeuralNetworks runtime is a library that communicates with
NeuralNetworks HIDL services and is linked by applications. To enable
the NN runtime to use these services, applications must have explicit
sepolicy permissions to find the NN services and communicate across
binder.

This CL relaxes neverallow rules for hal_neuralnetworks_*.

Because it is affecting pre-existing neverallow rules, this CL requires
a CTS rebuild.

Bug: 70340780
Test: mm
Test: ran neuralnetworks vts and cts binaries
Change-Id: I84f73ac77486681f91d1f8687268c0fa22a7ba0b
(cherry picked from commit 598870bebc4bb34542df81799b46f3cdcfb6723b)
2018-01-16 13:50:37 -08:00
Tri Vo
1740ddb521 Merge "Introduce system_executes_vendor_violators attribute."
am: ba6cd7b1fe

Change-Id: I8bbf4dcff1f60df976da404500c9ccf377ea7d65
2018-01-16 20:19:33 +00:00
Tri Vo
ba6cd7b1fe Merge "Introduce system_executes_vendor_violators attribute." 2018-01-16 20:07:00 +00:00
Joel Galenson
1128a4e56d Merge "Improve neverallow error messages and allow disabling them on userdebug builds."
am: 0432e19f44

Change-Id: I3714ae2b44086bfaddb89819039b6c8cc575e536
2018-01-16 19:48:57 +00:00
Yifan Hong
8fe0a12faf Allow shell to start vendor shell
am: 00ab5d86be

Change-Id: Ia2db656580086c542a2dd96cbd725686063bcb26
2018-01-16 19:48:39 +00:00
Treehugger Robot
0432e19f44 Merge "Improve neverallow error messages and allow disabling them on userdebug builds." 2018-01-16 18:59:25 +00:00
Yifan Hong
00ab5d86be Allow shell to start vendor shell
Test: adb shell /vendor/bin/sh
Fixes: 65448858
Change-Id: Ic2c9fa9b7e5bed3e1532f4e545f54a857ea99fc6
2018-01-16 18:28:51 +00:00
Tri Vo
282dbf7bbb Introduce system_executes_vendor_violators attribute.
We use this attribute to annotate coredomains that execute vendor code
in a Treble-violating way.

Bug: 62041836
Test: sepolicy builds
Change-Id: Ie6052209b3901eaad8496b8fc9681421d7ee3c1c
2018-01-16 17:43:30 +00:00
Nathan Harold
0003e3d54c Allow More Apps to Recv UDP Sockets from SystemServer
am: ee268643c1

Change-Id: I69408d68b23c241e396e303f7b68f34c4f6fb832
2018-01-16 02:42:56 +00:00
Nathan Harold
ee268643c1 Allow More Apps to Recv UDP Sockets from SystemServer
This gives the privilege to system apps, platform apps,
ephemeral apps, and privileged apps to receive a
UDP socket from the system server. This is being added
for supporting UDP Encapsulation sockets for IPsec, which
must be provided by the system.

This is an analogous change to a previous change that
permitted these sockets for untrusted_apps:
0f75a62e2c

Bug: 70389346
Test: IpSecManagerTest, System app verified with SL4A
Change-Id: Iec07e97012e0eab92a95fae9818f80f183325c31
2018-01-15 23:10:42 +00:00
Andreas Gampe
3fa95acb1e Sepolicy: Allow perfprofd to contact dropbox
Give rights to call dropbox via binder.

Test: m
Test: manual
Change-Id: I968c432a27bc8fbe677a2dd03671908d555f9df6
2018-01-12 09:39:20 -08:00
Joel Galenson
5988b5659a Improve neverallow error messages and allow disabling them on userdebug builds.
This patch adds a flag that can be used to ignore neverallow rules.
By adding
SELINUX_IGNORE_NEVERALLOWS := true
into the BoardConfig.mk file, neverallow violations will be ignored
silently.  This flag can only be enabled on userdebug and eng builds.

Users of this flag should be very careful.  Since it does not work on
user builds, it must be disabled to pass CTS, and enabling it for
too long could hide issues that need to be addressed.

As a happy side effect, this patch should also improve the error
messages when violating a neverallow rules.  Specifically, the file
and line number should be correct.

Bug: 70950899
Bug: 33960443
Test: Built walleye-{user,eng} with and without this new option and
a neverallow violation.  Built policy for all targets.

Change-Id: Id0d65123cdd230d6b90faa6bb460d544054bb906
2018-01-12 09:11:59 -08:00
Tri Vo
30c3c2a85c Files under /vendor must have attribute vendor_file_type.
Label /vendor/etc/selinux/* as vendor_configs_file.

Bug: 62041836
Test: build system/sepolicy
Test: walleye boots
Change-Id: I617a3287860e965c282e9e82b4375ea68dbca785
2018-01-12 00:05:41 +00:00
Tom Cherry
9cb71cc931 Merge "Add toolbox to vendor partition"
am: 1d2c3f4406

Change-Id: Ic874243cb997d588df01d5099d3c25f14ffd2119
2018-01-11 23:57:49 +00:00
Tom Cherry
1d2c3f4406 Merge "Add toolbox to vendor partition" 2018-01-11 23:50:46 +00:00
Holly Jiuyu Sun
145d2d11ae Merge "Add EuiccCardManager and EuiccCardController."
am: 193b1ab3da

Change-Id: Iee7632fde0be5301347d6f7e41d3b81c5de37c85
2018-01-11 22:57:21 +00:00
Tom Cherry
b7255bf2bf Add toolbox to vendor partition
Bug: 71861796
Test: no more denials on walleye for shell init scripts
Change-Id: I51eab267c95a915f927b0aaa7db9d678a83093c7
2018-01-11 12:53:09 -08:00
Holly Jiuyu Sun
193b1ab3da Merge "Add EuiccCardManager and EuiccCardController." 2018-01-11 20:44:33 +00:00
Jeff Vander Stoep
02dbf4e0a1 relabel files in /proc/net/xt_qtaguid/
am: 43303c8b89

Change-Id: I5e085251c1ccfd8206e421c9b0276a2add385171
2018-01-11 20:35:05 +00:00