Commit graph

12129 commits

Author SHA1 Message Date
TreeHugger Robot
0e4e784c61 Merge "Allow PackageManager to create a new service" into oc-mr1-dev 2017-08-08 15:58:41 +00:00
Todd Kennedy
8bb80471b9 Allow PackageManager to create a new service
A new API [getNamesForUids] was recently added to the PackageManager
and this API needs to be accessible to native code. However, there
were two constraints:
1) Instead of hand-rolling the binder, we wanted to auto generate
the bindings directly from the AIDL compiler.
2) We didn't want to expose/annotate all 180+ PackageManager APIs
when only a single API is needed.
So, we chose to create a parallel API that can be used explicitly
for native bindings without exposing the entirety of the
PackageManager.

Bug: 62805090
Test: Manual
Test: Create a native application that calls into the new service
Test: See the call works and data and returned
Change-Id: I0d469854eeddfa1a4fd04b5c53b7a71ba3ab1f41
2017-08-04 13:33:42 -07:00
Dan Cashman
e772a5cfd7 Record thermalserviced_tmpfs for compat infrastructure.
Commit: ec3b6b7e25 added a new daemon
and corresponding types to sepolicy.  The explicitly declared types
were added to 26.0.ignore.cil to reflect the labeling of new objects,
but another type, thermalserviced_tmpfs was created by macro and was
missed in code review.  Add it as well.

Bug: 62573845
Test: None. prebuilt change.
Change-Id: Ia8968448eea0be889911f46fe255f581659eb548
(cherry picked from commit 2490f1adad)
2017-08-04 16:34:56 +00:00
Todd Poynor
e9b2def796 thermal: sepolicy for thermalservice and Thermal HAL revision 1.1
Add sepolicy for thermalserviced daemon, IThermalService binder
service, IThermalCallback hwservice, and Thermal HAL revision 1.1.

Test: manual: marlin with modified thermal-engine.conf
Bug: 30982366
Change-Id: I207fa0f922a4e658338af91dea28c497781e8fe9
(cherry picked from commit ec3b6b7e25)
2017-08-04 16:24:05 +00:00
Philip P. Moltmann
420be61f78 Merge "Allow untrusted apps to read apks" into oc-mr1-dev 2017-08-02 19:24:38 +00:00
TreeHugger Robot
50e798e0c6 Merge changes Ibad30515,If360eb9e into oc-mr1-dev
* changes:
  Fix CoredomainViolators typo and clean up test option parsing.
  Record hal_wifi_offload_hwservice type for compatibility.
2017-08-02 17:39:43 +00:00
Ruchi Kandoi
61d9aaf9b4 Allow nfc application to set nfc property
am: 0393dafd5d

Change-Id: Ida00cdf24a809888233ede97a83d42ed5c1a8574
2017-08-01 20:47:13 +00:00
Ruchi Kandoi
0393dafd5d Allow nfc application to set nfc property
type=1400 audit(1501520483.066:14): avc: denied { write } for pid=3330
comm=4173796E635461736B202331 name="property_service" dev="tmpfs"
ino=10749 scontext=u:r:nfc:s0 tcontext=u:object_r:property_socket:s0
tclass=sock_file permissive=0

Test: No sepolicy denials
Bug: 64010793
Change-Id: I8d73e8e19cd4d0a8c61f1f184820c53e5cc2b6d6
(cherry picked from commit df9649503a)
2017-08-01 20:35:07 +00:00
Dan Cashman
905df1550d Fix CoredomainViolators typo and clean up test option parsing.
Test: Run test suite with no tests, CoredomainViolators, CoredomainViolations,
and multiple tests arguments specified.
Change-Id: Ibad30515b32eb4e1e83c8ab157c21ce4ab01365b
2017-07-31 14:28:26 -07:00
Dan Cashman
3fc7f836a3 Record hal_wifi_offload_hwservice type for compatibility.
Commit: 5aef6a9469 added a new type,
system_net_netd_hwservice, for a new hwservice.  Record this in the
compatibility infrastructure as labeling a new object, rather than
relabeling one from O.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: If360eb9e05684d9b47316d53e494aa773485e93f
2017-07-31 14:25:09 -07:00
Dan Cashman
079a98b8eb Record mediaprovider_tmpfs type for compatibility.
Commit: 3eed3eacfb added the compatibility
statement for the new mediaprovider app domain, but it missed another
new, private type, mediaprovider_tmpfs, that is automatically created for
all appdomains.  It replaces priv_app_tmpfs, but since both types are
private, they do not need to be added to the actual mapping (vendor policy
cannot use it).

Bug: 62573845
Test: None.  Prebuilt-only change.
Change-Id: I62229a5be74cd928fe0ca82a45b73cb61d6f5223
2017-07-31 14:18:47 -07:00
Dan Cashman
0785a72cda Record hal_wifi_offload_hwservice type for compatibility.
Commit: 632bc494f1 added hwservice labeling
and was cherry-picked to oc-dev, but the hal_wifi_offload_hwservice type
was not part of the cherry-pick because the service was not in oc-dev.
Record the type for compatibility purposes.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: Ib2c0fe862eddb566fbe6b0287238fa93dddae7b8
2017-07-31 14:14:59 -07:00
Niranjan Pendharkar
a3a9d4c0b4 Merge "Add system_net_netd_hwservice." into oc-dr1-dev
am: 23b986ce2f

Change-Id: I1bc8e3375fce75763efb8ba369715146a33f106b
2017-07-31 18:56:36 +00:00
TreeHugger Robot
23b986ce2f Merge "Add system_net_netd_hwservice." into oc-dr1-dev 2017-07-31 18:34:39 +00:00
Philip P. Moltmann
bdac15aa88 Allow untrusted apps to read apks
Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
Change-Id: If2094057d1acfbbf007ae108225decd9ad70e459
2017-07-28 22:54:39 +00:00
TreeHugger Robot
17533144b8 Merge "Fix selinux denials during bugreport" into oc-mr1-dev 2017-07-28 19:11:07 +00:00
Niranjan Pendharkar
5aef6a9469 Add system_net_netd_hwservice.
This hidl service provides functionality for oem networking
configuration to vendor services which is required by
at least some vendor radio modules.

Test: VtsHalNetNetdV1_0TargetTest, netd_integration_test, netd_unit_test
Test: no denials
Bug: 36682246
Change-Id: I86ac9082166b406b2fc814972375ba737460ad7b
2017-07-28 15:53:28 +00:00
Tim Kryger
6763d28e86 Fix selinux denials during bugreport
avc: denied { read } for pid=1704 comm="top" name="stat" dev="proc" ino=4026532297 scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0
avc: denied { read } for pid=1636 comm="dumpstate" name="lcd-backlight" dev="sysfs" ino=16592 scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=lnk_file permissive=0
avc: denied { call } for pid=2230 comm="dumpsys" scontext=u:r:dumpstate:s0 tcontext=u:r:installd:s0 tclass=binder permissive=0
avc: denied { create } for pid=1700 comm="ip" scontext=u:r:dumpstate:s0 tcontext=u:r:dumpstate:s0 tclass=netlink_xfrm_socket permissive=0

Bug: 62410287
Bug: 35350306
Change-Id: I65be3678c64214ebeb544e0e155bce88b21adf02
Signed-off-by: Tim Kryger <tkryger@google.com>
(cherry picked from commit b7e1f2dd19)
2017-07-28 08:35:54 -07:00
Jeff Vander Stoep
e1be4a8ca0 netd: relax binder neverallow rules for hwservices am: faaf86bcf6
am: 427a0c7b4e  -s ours

Change-Id: I2716725d186d6660b5a1390224fe5c06669d6485
2017-07-28 00:32:15 +00:00
Jeff Vander Stoep
427a0c7b4e netd: relax binder neverallow rules for hwservices
am: faaf86bcf6

Change-Id: I546b7be93591d638ad82978aca5f4823e7b6ab93
2017-07-28 00:29:46 +00:00
Jeffrey Vander Stoep
c6fed2284e Merge "netd: relax binder neverallow rules for hwservices" into oc-mr1-dev 2017-07-28 00:11:32 +00:00
Jeff Vander Stoep
faaf86bcf6 netd: relax binder neverallow rules for hwservices
Relax neverallow rule restricting binder access to/from netd so that
netd can export hwbinder services to vendor components.

Continue to disallow app access to netd via binder.

Bug: 36682246
Test: build
Merged-In: I8e558ea1add6c36b966ec1da204062ea82df3f3f
Change-Id: I063df6dded94d8b0f5214b2c94c4f46bdafb03d7
2017-07-27 10:01:53 -07:00
Jeff Vander Stoep
e98ab0cbec netd: relax binder neverallow rules for hwservices
Relax neverallow rule restricting binder access to/from netd so that
netd can export hwbinder services to vendor components.

Continue to disallow app access to netd via binder.

Bug: 36682246
Test: build
Change-Id: I8e558ea1add6c36b966ec1da204062ea82df3f3f
(cherry picked from commit 07c650ebf2)
2017-07-27 09:55:54 -07:00
TreeHugger Robot
3c5e3f9479 Merge "bootanim: is a client of configstore HAL" into oc-mr1-dev 2017-07-26 20:35:25 +00:00
Jeff Vander Stoep
b558da6722 bootanim: is a client of configstore HAL
Addresses:
avc:  denied  { find } for
interface=android.hardware.configstore::ISurfaceFlingerConfigs pid=603
scontext=u:r:bootanim:s0
tcontext=u:object_r:hal_configstore_ISurfaceFlingerConfigs:s0
tclass=hwservice_manager permissive=0

Bug: 64067152
Test: build
Change-Id: I0605ab8ba07a46a3dc6909307e6f0b2fde68a7ba
2017-07-26 10:12:32 -07:00
Michael Butler
e9d07b9e5f Default sepolicy rules for initial upload of Neural Network API.
Bug: 63905942
Test: mm -j40
Change-Id: I354ee863475aedd2dc9d2b436a00bcd82931456f
(cherry picked from commit 4fc5fb5e521347d65dc921f8c1fb751c66f9a92c)
2017-07-25 20:42:26 +00:00
Josh Gao
fde0e02a2c crash_dump_fallback: allow writing to system_server pipes.
Allow mediacodec/mediaextractor to write to system_server pipes during
ANR dumps.

Addresses the following denials:
avc: denied { write } for comm="mediaextractor" path="pipe:[1177610]" dev="pipefs" ino=1177610 scontext=u:r:mediaextractor:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0
avc: denied { write } for comm="omx@1.0-service" path="pipe:[1175808]" dev="pipefs" ino=1175808 scontext=u:r:mediacodec:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0

Bug: http://b/63801592
Test: treehugger
Change-Id: I944b1fa76c70402607ccd903be17dbddeaa73201
(cherry picked from commit 3c9b91977d)
2017-07-20 20:14:05 +00:00
Jeff Vander Stoep
f2230155d0 runas: grant access to seapp_contexts files am: dcec3ee905 -s ours am: 0da855ab0f -s ours am: 18e75e3a15 -s ours
am: faf0504aa4  -s ours

Change-Id: I8da56e4bda1a86b9631b5936378ad44f4036fec2
2017-07-19 21:28:52 +00:00
Jeff Vander Stoep
faf0504aa4 runas: grant access to seapp_contexts files am: dcec3ee905 -s ours am: 0da855ab0f -s ours
am: 18e75e3a15  -s ours

Change-Id: I22ef22f0146170e03a02b72f668e62067ad448af
2017-07-19 21:18:42 +00:00
Jeff Vander Stoep
18e75e3a15 runas: grant access to seapp_contexts files am: dcec3ee905 -s ours
am: 0da855ab0f  -s ours

Change-Id: Ib03ffbf671ea4e48eb3e1f6fb0045c2bc33570dc
2017-07-19 21:15:42 +00:00
Jeff Vander Stoep
0da855ab0f runas: grant access to seapp_contexts files
am: dcec3ee905  -s ours

Change-Id: Id04fb68971510d089e4fcd53fa24b77a1e9cd760
2017-07-19 21:13:17 +00:00
TreeHugger Robot
9cdb93c4a1 Merge "Allow vendor domains to use the untrusted_app_all attribute" 2017-07-19 20:16:50 +00:00
Jeff Vander Stoep
dcec3ee905 runas: grant access to seapp_contexts files
To be replaced by commit 1e149967a
seapp_context: explicitly label all seapp context files

Test: build policy
Change-Id: I8d30bd1d50b9e4a55f878c25d134907d4458cf59
Merged-In: I0f0e937e56721d458e250d48ce62f80e3694900f
2017-07-19 12:54:59 -07:00
Jeff Vander Stoep
683fcf00e1 Do not expand hal_audio attribute am: 89f215e6a0
am: 3e6d842deb

Change-Id: I42d9ebc6231932c6e5289ad2e9e4301c256f0036
2017-07-19 18:22:56 +00:00
Jeff Vander Stoep
3e6d842deb Do not expand hal_audio attribute
am: 89f215e6a0

Change-Id: I6126315b398b2f66a5a7d9c98a8d9630c01314a7
2017-07-19 18:19:08 +00:00
Jeff Vander Stoep
89f215e6a0 Do not expand hal_audio attribute
Fixes:
neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
Warning!  Type or attribute hal_audio used in neverallow undefined in
policy being checked.

hal_audio_client is not used in neverallows and was mistakenly marked
as expandattribute false instead of hal_audio. Fix this.

Bug: 63809360
Test: build policy
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
    android.cts.security.SELinuxNeverallowRulesTest

    No more:
    Warning!  Type or attribute hal_audio used in neverallow
    undefined in policy being checked.

Change-Id: Iedf1b80f669f95537ed201cbdbb0626e7e32be81
2017-07-19 09:08:41 -07:00
TreeHugger Robot
c14ac43389 Merge "hal_configstore: add neverallow restrictions" 2017-07-19 00:57:45 +00:00
Max Bires
e073f400cd Merge "allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns" am: 9f8773b458 am: 00d286841b am: 8926a40845
am: d526583f22

Change-Id: Id375d476c919186402451edd32b7c119a41d0e35
2017-07-18 23:36:57 +00:00
Max Bires
d526583f22 Merge "allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns" am: 9f8773b458 am: 00d286841b
am: 8926a40845

Change-Id: I88b8207da595bbae9d7791fc5b1446528b98f9b1
2017-07-18 23:06:45 +00:00
Max Bires
8926a40845 Merge "allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns" am: 9f8773b458
am: 00d286841b

Change-Id: Ifcb82f3ae89e3033b85ca02b2ea9474ba0315569
2017-07-18 23:03:45 +00:00
Max Bires
00d286841b Merge "allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns"
am: 9f8773b458

Change-Id: I010337f7f5b81f4025a0d57e0e0b4fb8f4a90296
2017-07-18 22:59:27 +00:00
Treehugger Robot
9f8773b458 Merge "allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns" 2017-07-18 22:56:14 +00:00
TreeHugger Robot
33a2962590 Merge "rm memcg type from ignore list." 2017-07-18 21:00:33 +00:00
Tianjie Xu
7bc0dca20b Allow update_engine to read postinstall_mnt_dir am: 8f68705349 am: 0bcb20306e am: b197b7c8ca
am: 0b2209bfe0

Change-Id: I2b8009c16046259a494dad10b005e3539fa24a85
2017-07-18 19:02:13 +00:00
Tianjie Xu
0b2209bfe0 Allow update_engine to read postinstall_mnt_dir am: 8f68705349 am: 0bcb20306e
am: b197b7c8ca

Change-Id: I77d33dec14641856fba474c16b7b98815313a049
2017-07-18 18:56:06 +00:00
Tianjie Xu
b197b7c8ca Allow update_engine to read postinstall_mnt_dir am: 8f68705349
am: 0bcb20306e

Change-Id: I9937141ff425f437d46463bdb944e4524f8d8aa1
2017-07-18 18:51:00 +00:00
Tianjie Xu
0bcb20306e Allow update_engine to read postinstall_mnt_dir
am: 8f68705349

Change-Id: Ib0ba78601046e6574cbb44752ebc431791a62df6
2017-07-18 18:44:59 +00:00
Max Bires
655599a69b allow system_server to write to cameraserver's /proc/<pid>/timerslack_ns
This is needed for timerslack functionality which should be present in
most kernels going forward

Test: system_server can write to cameraserver files
Change-Id: I85797128b1467d92eb354364de8eb60f8e45c931
2017-07-18 10:28:33 -07:00
Dan Cashman
9d0737a5e3 rm memcg type from ignore list.
This type was removed in commit: 93166cefce
and no longer needs to be included in compatibility infrastructure.

Bug: 62573845
Test: None, prebuilt change.
Change-Id: I9dc05512c7fcb3ef4445c4c6b040809a1d595282
2017-07-18 10:19:53 -07:00
Ranjith Kagathi Ananda
39fe4c715c Allow vendor domains to use the untrusted_app_all attribute
Remove restriction to restrict only domains in AOSP to use the
untrusted_app_all attribute

BUG=63167163
Test: Sanity check

Change-Id: I9e1b8605fad108f45f988d8198a9a1cadb8dfa5e
2017-07-17 16:32:17 +00:00