Commit graph

9588 commits

Author SHA1 Message Date
Tianjie Xu
daa7ef3d39 Merge "Allow update_verifier to read dm blocks" am: 254ce3fbe8 am: 3439a0c954 am: f9cc18f676
am: 20ed802517

Change-Id: Iefb6b106dd25dd7bf10765181e4a1203fed476e8
2017-02-03 22:10:03 +00:00
Tianjie Xu
20ed802517 Merge "Allow update_verifier to read dm blocks" am: 254ce3fbe8 am: 3439a0c954
am: f9cc18f676

Change-Id: I8bd6edb0093eab232f07b3c9a1cec12a5db005cc
2017-02-03 22:08:02 +00:00
Tianjie Xu
f9cc18f676 Merge "Allow update_verifier to read dm blocks" am: 254ce3fbe8
am: 3439a0c954

Change-Id: I9cd32577cf38575e00dfdc1f0dbe5868cd445b0f
2017-02-03 22:02:01 +00:00
Tianjie Xu
3439a0c954 Merge "Allow update_verifier to read dm blocks"
am: 254ce3fbe8

Change-Id: I5108f9113b5511fcda6331b5af860efcc7f8baba
2017-02-03 21:57:31 +00:00
Tianjie Xu
254ce3fbe8 Merge "Allow update_verifier to read dm blocks" 2017-02-03 21:50:07 +00:00
Max Bires
f47ee7fbd2 Exclude dev/null from auditing - was producing log spam.
Test: Device boots
Change-Id: I2fb0a03c9ed84710dc2db7b170c572a2eae45412
2017-02-03 13:26:32 -08:00
Tianjie Xu
d5cdca08c7 Allow update_verifier to read dm blocks
Update_verifier will read dm-wrapped system/vendor partition. Therefore,
change the sepolicy accordingly.

Here's the denied message:
update_verifier: type=1400 audit(0.0:131): avc: denied { read } for
name="dm-0" dev="tmpfs" ino=15493 scontext=u:r:update_verifier:s0
tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0

Bug: 34391662
Test: Read of /dev/block/dm-0 succeeds during boot time.
Change-Id: I23325bd92f6e28e9b1d62a0f2348837cece983d1
2017-02-03 21:00:30 +00:00
Jiyong Park
dbe4189e58 Merge "configstore: add selinux policy for configstore@1.0 hal" am: 9eff8526b7 am: e822c5a461 am: 451c569163
am: a95550bd51  -s ours

Change-Id: I46487a6d81d5a2515aaea65ccfd972de860970a3
2017-02-02 23:42:00 +00:00
Jiyong Park
a95550bd51 Merge "configstore: add selinux policy for configstore@1.0 hal" am: 9eff8526b7 am: e822c5a461
am: 451c569163

Change-Id: I8fab319012610715dffcc92177132238ba908ade
2017-02-02 23:16:29 +00:00
Jiyong Park
451c569163 Merge "configstore: add selinux policy for configstore@1.0 hal" am: 9eff8526b7
am: e822c5a461

Change-Id: I1d41e93586f2114219498f35d3eb420c159ba533
2017-02-02 23:14:28 +00:00
Jiyong Park
e822c5a461 Merge "configstore: add selinux policy for configstore@1.0 hal"
am: 9eff8526b7

Change-Id: I84fa34a4ec67329f5225208c2e223f8bd99ebde3
2017-02-02 23:12:00 +00:00
Jiyong Park
9eff8526b7 Merge "configstore: add selinux policy for configstore@1.0 hal" 2017-02-02 23:07:18 +00:00
Eugene Susla
e81736d2d3 Merge "SELinux permissions for companion device system service" am: b598b47f1a am: 9fb3601b5b am: 5715f8e0a2
am: 360be64852

Change-Id: Id04953e695795a5660c42021eafa8629d4daa55e
2017-02-02 21:54:54 +00:00
Eugene Susla
360be64852 Merge "SELinux permissions for companion device system service" am: b598b47f1a am: 9fb3601b5b
am: 5715f8e0a2

Change-Id: I6627465ab925aa2fc00d099b89d9a0a6cd5f7b44
2017-02-02 21:49:53 +00:00
Eugene Susla
5715f8e0a2 Merge "SELinux permissions for companion device system service" am: b598b47f1a
am: 9fb3601b5b

Change-Id: Ica72b726bf356488796b665e6a22bdb9a245f7fa
2017-02-02 21:47:50 +00:00
Eugene Susla
9fb3601b5b Merge "SELinux permissions for companion device system service"
am: b598b47f1a

Change-Id: I847241832a67346a58d2b6e1e4c53d57b7297be0
2017-02-02 21:45:05 +00:00
Eugene Susla
b598b47f1a Merge "SELinux permissions for companion device system service" 2017-02-02 21:11:34 +00:00
Max Bires
368f68c866 Removing init and ueventd access to generic char files am: 3171829af3 am: 56ae32916c am: ec4eece92b
am: 62e4a2a715

Change-Id: I30c5b40fedfb3f9a9cab2633fc52d86442fdf709
2017-02-02 16:59:06 +00:00
Jiyong Park
ebec1aa2b7 configstore: add selinux policy for configstore@1.0 hal
This change adds selinux policy for configstore@1.0 hal. Currently, only
surfaceflinger has access to the HAL, but need to be widen.

Bug: 34314793
Test: build & run

Merged-In: I40e65032e9898ab5f412bfdb7745b43136d8e964
Change-Id: I40e65032e9898ab5f412bfdb7745b43136d8e964
(cherry picked from commit 5ff0f178ba)
2017-02-02 17:46:41 +09:00
Max Bires
62e4a2a715 Removing init and ueventd access to generic char files am: 3171829af3 am: 56ae32916c
am: ec4eece92b

Change-Id: Ib19590277d3e6b0c8f2b4777f15858f4c995b9b5
2017-02-02 03:31:53 +00:00
Max Bires
ec4eece92b Removing init and ueventd access to generic char files am: 3171829af3
am: 56ae32916c

Change-Id: I4f6b66e42bba503dc1ba43bc22ac15e16ba3f878
2017-02-02 03:28:46 +00:00
Max Bires
56ae32916c Removing init and ueventd access to generic char files
am: 3171829af3

Change-Id: Ifef40c211276c8cdf576e10cb04753dcb150ad65
2017-02-02 03:25:21 +00:00
Josh Gao
943d7ed51e crash_dump: dontaudit CAP_SYS_PTRACE denial.
Bug: http://b/34853272
Test: debuggerd -b `pidof zygote`
Change-Id: I0b18117754e77cfa94cf0b95aff32edb578b1a95
2017-02-01 17:56:07 -08:00
Josh Gao
4d140237b5 crash_dump: don't allow CAP_SYS_PTRACE or CAP_KILL.
Bug: http://b/34853272
Test: debuggerd -b `pidof system_server`
Change-Id: I4c08efb9dfcc8610143f722ae0674578a2ed6869
2017-02-01 17:56:07 -08:00
Mark Salyzyn
1c8ad93f53 Merge "logd: add getEventTag command and service" am: 542a46267f am: 2cf8777fe5 am: c480ee7d45
am: adce24c352

Change-Id: Iff0acc735158464b12b9011b69da55fb0ca8eccb
2017-02-01 21:39:47 +00:00
Mark Salyzyn
adce24c352 Merge "logd: add getEventTag command and service" am: 542a46267f am: 2cf8777fe5
am: c480ee7d45

Change-Id: Ie7e782bb7bb88bec2964d3a277165b8c21bc7125
2017-02-01 21:37:16 +00:00
Max Bires
3171829af3 Removing init and ueventd access to generic char files
There are many character files that are unreachable to all processes
under selinux policies. Ueventd and init were the only two domains that
had access to these generic character files, but auditing proved there
was no use for that access. In light of this, access is being completely
revoked so that the device nodes can be removed, and a neverallow is
being audited to prevent future regressions.

Test: The device boots
Bug: 33347297
Change-Id: If050693e5e5a65533f3d909382e40f9c6b85f61c
2017-02-01 21:35:08 +00:00
Mark Salyzyn
c480ee7d45 Merge "logd: add getEventTag command and service" am: 542a46267f
am: 2cf8777fe5

Change-Id: Iddcca41bed60cc584287a7d1128b90d02bb7e656
2017-02-01 21:34:46 +00:00
Mark Salyzyn
2cf8777fe5 Merge "logd: add getEventTag command and service"
am: 542a46267f

Change-Id: I169dbd05d71939e6a337e20a131caa7cbad3a977
2017-02-01 21:31:40 +00:00
Mark Salyzyn
542a46267f Merge "logd: add getEventTag command and service" 2017-02-01 21:24:06 +00:00
Eugene Susla
3411dfb6b0 SELinux permissions for companion device system service
Required for I0aeb653afd65e4adead13ea9c7248ec20971b04a

Test: Together with I0aeb653afd65e4adead13ea9c7248ec20971b04a, ensure that the
system service works
Bug: b/30932767
Change-Id: I994b1c74763c073e95d84222e29bfff5483c6a07
2017-02-01 13:07:17 -08:00
Jiyong Park
e2d0e74147 Merge "configstore: add selinux policy for configstore@1.0 hal" 2017-02-01 04:23:12 +00:00
Calin Juravle
635e412dd0 Remove SElinux audit to libart_file am: 01ee59a7b4 am: 2ce7f8362f am: 9ab9ba6592
am: 4616a5bff5

Change-Id: I6e33653fa0c89f0f2051d71f854d7c24b54932c3
2017-02-01 01:14:19 +00:00
Calin Juravle
4616a5bff5 Remove SElinux audit to libart_file am: 01ee59a7b4 am: 2ce7f8362f
am: 9ab9ba6592

Change-Id: I31c1b620cf1032fb299854bf2b9620a852b78bb5
2017-02-01 01:01:34 +00:00
Calin Juravle
9ab9ba6592 Remove SElinux audit to libart_file am: 01ee59a7b4
am: 2ce7f8362f

Change-Id: I88ba39fbbb013a14733058478206c90dfa09ca2b
2017-02-01 00:59:03 +00:00
Calin Juravle
2ce7f8362f Remove SElinux audit to libart_file
am: 01ee59a7b4

Change-Id: I2d5889cd3faf16957ed329234ffd7b3bc6504203
2017-02-01 00:56:37 +00:00
Calin Juravle
01ee59a7b4 Remove SElinux audit to libart_file
Since it was introduced it caused quite a few issues and it spams the
SElinux logs unnecessary.

The end goal of the audit was to whitelist the access to the
interpreter. However that's unfeasible for now given the complexity.

Test: devices boots and everything works as expected
      no more auditallow logs

Bug: 29795519
Bug: 32871170
Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
2017-01-31 23:43:14 +00:00
Alex Klyubin
e396043f75 Merge "Device-agnostic policy for vendor image" am: 9e90f83e7b am: e9f4b5998c am: f428935193
am: 751b4a72f5

Change-Id: I14fd0e31526558566948160258bcd18a052a6531
2017-01-31 21:38:49 +00:00
Alex Klyubin
751b4a72f5 Merge "Device-agnostic policy for vendor image" am: 9e90f83e7b am: e9f4b5998c
am: f428935193

Change-Id: Ia064e979639b5cb87faf66469adadc8c480f8362
2017-01-31 21:36:18 +00:00
Alex Klyubin
f428935193 Merge "Device-agnostic policy for vendor image" am: 9e90f83e7b
am: e9f4b5998c

Change-Id: Ic85c671aa7ceb78f0814a799e609f51384b3a125
2017-01-31 21:34:23 +00:00
Alex Klyubin
e9f4b5998c Merge "Device-agnostic policy for vendor image"
am: 9e90f83e7b

Change-Id: Idf1178328847bf597005c66c7652e4bda25c3bdd
2017-01-31 21:32:19 +00:00
Alex Klyubin
9e90f83e7b Merge "Device-agnostic policy for vendor image" 2017-01-31 21:29:10 +00:00
Mark Salyzyn
5f08f6e9a9 logd: restrict access to /dev/event-log-tags am: d33a9a194b am: 650c101f51 am: b6d71e6f07
am: 065e1db790

Change-Id: Ib93a117ce2e49282ac9bdae7c2ac025a6d55af2e
2017-01-31 17:40:00 +00:00
Mark Salyzyn
065e1db790 logd: restrict access to /dev/event-log-tags am: d33a9a194b am: 650c101f51
am: b6d71e6f07

Change-Id: I1c365e705991a457256e24e49ec316e57b1e3dda
2017-01-31 17:37:27 +00:00
Mark Salyzyn
b6d71e6f07 logd: restrict access to /dev/event-log-tags am: d33a9a194b
am: 650c101f51

Change-Id: Ida00e8474497cdbdb9c1ec4f4849b2eed7683026
2017-01-31 17:34:59 +00:00
Mark Salyzyn
650c101f51 logd: restrict access to /dev/event-log-tags
am: d33a9a194b

Change-Id: I8f95628067641e773623603681f226dab4939f2a
2017-01-31 17:33:00 +00:00
Mark Salyzyn
384ce66246 logd: add getEventTag command and service
The event log tag service uses /dev/event-log-tags, pstore and
/data/misc/logd/event-log-tags as sticky storage for the invented
log tags.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Bug: 31456426
Change-Id: Iacc8f36f4a716d4da8dca78a4a54600ad2a288dd
2017-01-31 15:50:42 +00:00
Mark Salyzyn
d33a9a194b logd: restrict access to /dev/event-log-tags
Create an event_log_tags_file label and use it for
/dev/event-log-tags.  Only trusted system log readers are allowed
direct read access to this file, no write access.  Untrusted domain
requests lack direct access, and are thus checked for credentials via
the "plan b" long path socket to the event log tag service.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 31456426
Bug: 30566487
Change-Id: Ib9b71ca225d4436d764c9bc340ff7b1c9c252a9e
2017-01-31 15:50:15 +00:00
Alex Klyubin
5596172d23 Device-agnostic policy for vendor image
Default HAL implementations are built from the platform tree and get
placed into the vendor image. The SELinux rules needed for these HAL
implementations to operate thus need to reside on the vendor
partition.

Up to now, the only place to define such rules in the source tree was
the system/sepolicy/public directory. These rules are placed into the
vendor partition. Unfortunately, they are also placed into the
system/root partition, which thus unnecessarily grants these rules to
all HAL implementations of the specified service, default/in-process
shims or not.

This commit adds a new directory, system/sepolicy/vendor, whose
rules are concatenated with the device-specific rules at build time.
These rules are thus placed into the vendor partition and are not
placed into the system/root partition.

Test: No change to SELinux policy.
Test: Rules placed into vendor directory end up in nonplat* artefacts,
      but not in plat* artefacts.
Bug: 34715716
Change-Id: Iab14aa7a3311ed6d53afff673e5d112428941f1c
2017-01-30 18:48:17 -08:00
Tao Bao
f71e4504c4 Merge "recovery: Allow accessing sysfs_leds." am: 04641948c0 am: 964c783f58 am: 7c7b92b2b9
am: 9c0b4b104c

Change-Id: I923e2af2b0e5f9a4510669567c256d251ae27ecb
2017-01-31 01:26:13 +00:00