Commit graph

8589 commits

Author SHA1 Message Date
Chad Brubaker
3d1e5959b4 Move neverallows from untrusted_app.te to app_neverallows.te am: 46e5a060f6
am: 829c8e0ac0

Change-Id: I9ded883761ec9d6fbbcfead877788edbbcb41521
2017-02-06 18:38:13 +00:00
Chad Brubaker
812213ae66 Merge ephemeral data and apk files into app am: 4c40d7344c
am: 95804f17e7

Change-Id: I744c77d2e32dd2d84a64197fb2bf5c41cffa6a61
2017-02-06 18:38:11 +00:00
Chad Brubaker
829c8e0ac0 Move neverallows from untrusted_app.te to app_neverallows.te
am: 46e5a060f6

Change-Id: Id2ccc41a74a8465e6fc33429c13ca22253a53f12
2017-02-06 18:35:12 +00:00
Chad Brubaker
95804f17e7 Merge ephemeral data and apk files into app
am: 4c40d7344c

Change-Id: I680e736766d371f6ac631cae26d11d85dc896e8f
2017-02-06 18:35:10 +00:00
Chad Brubaker
46e5a060f6 Move neverallows from untrusted_app.te to app_neverallows.te
The neverallows in untrusted_app will all apply equally to ephemeral app
and any other untrusted app domains we may add, so this moves them to a
dedicated separate file.

This also removes the duplicate rules from isolated_app.te and ensures
that all the untrusted_app neverallows also apply to isolated_app.

Test: builds
Change-Id: Ib38e136216ccbe5c94daab732b7ee6acfad25d0b
2017-02-06 10:16:50 -08:00
Chad Brubaker
4c40d7344c Merge ephemeral data and apk files into app
The rules for the two types were the same and /data/app-ephemeral is
being removed. Remove these types.

Test: Builds
Change-Id: I520c026395551ad1362dd2ced53c601d9e6f9b28
2017-02-06 10:16:50 -08:00
Max Bires
4aa99076bb Merge "Exclude dev/null from auditing - was producing log spam." am: a38067c770
am: 0979abc0f9

Change-Id: I191354b6b80d23fd7fd5ac8e1bff77552278bb95
2017-02-03 23:10:54 +00:00
Max Bires
0979abc0f9 Merge "Exclude dev/null from auditing - was producing log spam."
am: a38067c770

Change-Id: Ia91ea8fec8f28cdb661a55e64ae1d50b03e17363
2017-02-03 23:08:24 +00:00
Treehugger Robot
a38067c770 Merge "Exclude dev/null from auditing - was producing log spam." 2017-02-03 23:04:55 +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
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
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
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
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
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
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
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
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
7c7b92b2b9 Merge "recovery: Allow accessing sysfs_leds." am: 04641948c0
am: 964c783f58

Change-Id: Ic71ba8a7219e9fc06d606e7218e863d678651cdb
2017-01-31 01:04:33 +00:00
Yin-Chia Yeh
1b17567178 Merge "Camera: grant system file perm for Treble" am: 81a73508be
am: c701272dde

Change-Id: I151807e1c2e69674f296827b2701dbe78476e7e8
2017-01-31 01:04:20 +00:00
Tao Bao
964c783f58 Merge "recovery: Allow accessing sysfs_leds."
am: 04641948c0

Change-Id: I8e2a131d51725e4ba2cb5867fe99565f810e6381
2017-01-31 00:57:31 +00:00
Yin-Chia Yeh
c701272dde Merge "Camera: grant system file perm for Treble"
am: 81a73508be

Change-Id: I1fd4a6c21ae80463fe67cc85db2949382453b948
2017-01-31 00:55:28 +00:00
Treehugger Robot
04641948c0 Merge "recovery: Allow accessing sysfs_leds." 2017-01-31 00:52:06 +00:00
Treehugger Robot
81a73508be Merge "Camera: grant system file perm for Treble" 2017-01-31 00:45:52 +00:00
Alex Klyubin
9595969ae6 Merge "Remove hal_light from system_server domain" am: 29f1e21d31
am: 42ab1b4f79

Change-Id: Ib98d75926d897486fb271348f623c804b01e3608
2017-01-30 23:16:53 +00:00
Alex Klyubin
42ab1b4f79 Merge "Remove hal_light from system_server domain"
am: 29f1e21d31

Change-Id: I8b8d1fca11d748c09faab382e9d0c8f0ca1fc1af
2017-01-30 23:14:53 +00:00
Alex Klyubin
29f1e21d31 Merge "Remove hal_light from system_server domain" 2017-01-30 23:11:01 +00:00
Yin-Chia Yeh
8a6d397f48 Camera: grant system file perm for Treble
Test: Google Camera app working
Bug: 34786432
Change-Id: Ie14ac8a58a331f96a56fb6fc09318e2d737c4076
2017-01-30 14:52:21 -08:00
Tao Bao
f0f4db9f01 recovery: Allow accessing sysfs_leds.
Bug: 34077703
Test: recovery image can set the backlight brightness.
Change-Id: I34d72e1a0e959c2d9f48b3b9c55c4eb2d1cc41bf
2017-01-30 14:25:32 -08:00