Commit graph

11952 commits

Author SHA1 Message Date
Jeff Vander Stoep
c75aa50d5d Add another extraneous neverallow rule to force attribute inclusion
Due to the massively increased number of attributes in SELinux policy
as part of the treble changes, we have had to remove attributes from
policy for performance reasons.  Unfortunately, some attributes are
required to be in policy to ensure that our neverallow rules are being
properly enforced.  Usually this is not a problem, since neverallow rules
indicate that an attribute should be kept, but this is not currently the
case when the attribute is part of a negation in a group.

This is particularly problematic with treble since some attributes may
exist for HALs that have no implementation, and thus no types.  In
particular, this has caused an issue with the neverallows added in our
macros.  Add an extraneous neverallow rule to each of those auto-generated
neverallow rules to make sure that they are not removed from policy, until
the policy compiler is fixed to avoid this.  Also add corresponding rules
for other types which have been removed due to no corresponding rules.

Bug: 62658302
Bug: 62999603
Test: Build Marlin policy.
Test: verify attribute exists in policy using sepolicy-analyze.
    sepolicy-analyze $OUT/vendor/etc/selinux/precompiled_sepolicy \
    attribute hal_tetheroffload_server
Test: CTS neverallow tests pass.
    cts-tradefed run cts -m CtsSecurityHostTestCases -t \
    android.cts.security.SELinuxNeverallowRulesTest
Change-Id: I62596ba8198ffdcbb4315df639a834e4becaf249
2017-06-26 10:32:18 -07:00
Jeff Vander Stoep
b596907cae Mark debugfs type with debugfs_type attribute
Test: build policy
Change-Id: If13838e8da6e3fe14bb5c7c7ade6f8ac0d5d1982
2017-06-25 15:35:54 -07:00
Jeff Sharkey
5b2b047279 Let vold execute mke2fs.
When adopting SD cards, vold partitions and formats those devices;
this had been working fine with the older make_ext4fs utility, but
newer devices are switching over to mke2fs, which has a different
SELinux label.

avc: denied { execute } for name="mke2fs" dev="dm-0" ino=456 scontext=u:r:vold:s0 tcontext=u:object_r:e2fs_exec:s0 tclass=file permissive=1
avc: denied { read open } for path="/system/bin/mke2fs" dev="dm-0" ino=456 scontext=u:r:vold:s0 tcontext=u:object_r:e2fs_exec:s0 tclass=file permissive=1
avc: denied { execute_no_trans } for path="/system/bin/mke2fs" dev="dm-0" ino=456 scontext=u:r:vold:s0 tcontext=u:object_r:e2fs_exec:s0 tclass=file permissive=1
avc: denied { getattr } for path="/system/bin/mke2fs" dev="dm-0" ino=456 scontext=u:r:vold:s0 tcontext=u:object_r:e2fs_exec:s0 tclass=file permissive=1

Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 36757864, 37436961
Change-Id: Ifb96dfca076ea58650eb32f89e850f20ae2ac102
2017-06-23 16:30:27 -06:00
Jeff Vander Stoep
b1948adde5 Merge "system_server is a client of configstore" into oc-dr1-dev am: 25578a3096
am: 0d8b983077

Change-Id: I55cbe59bf1be98555ea2a13e42c949477761e1da
2017-06-23 21:57:05 +00:00
Jeff Vander Stoep
0d8b983077 Merge "system_server is a client of configstore" into oc-dr1-dev
am: 25578a3096

Change-Id: I1d49bdbd662e4037843a2c6af4954a4a926c8543
2017-06-23 21:47:45 +00:00
TreeHugger Robot
25578a3096 Merge "system_server is a client of configstore" into oc-dr1-dev 2017-06-23 21:32:13 +00:00
Jeff Vander Stoep
23e0a7f23a system_server is a client of configstore
avc:  denied  { find } for
interface=android.hardware.configstore::ISurfaceFlingerConfigs
scontext=u:r:system_server:s0
tcontext=u:object_r:hal_configstore_ISurfaceFlingerConfigs:s0
tclass=hwservice_manager permissive=0

Bug: 35197529
Test: Device boots without this denial
Change-Id: Ia43bc5879e03a1f2056e373b17cc6533636f98b1
2017-06-23 11:20:20 -07:00
Tomasz Wasilczyk
fdbf71e7a6 Remove previous implementation of RadioService.
Bug: b/36863239
Test: instrumentalization
Change-Id: I782693dcda13bd38b45626a65c8eeae552368030
2017-06-23 10:47:42 -07:00
Narayan Kamath
034f5840a2 DO NOT MERGE ANYWHERE Revert "SEPolicy: Changes for new stack dumping scheme."
NOTE: This change is marked dnma because we don't want it on
oc-dr1-dev-plus-aosp or any other downstream branch. Moreover,
oc-dr1-dev-plus-aosp is the only outgoing merger from oc-dr1-dev for
this project.

This reverts commit 11bfcc1e96.

Bug: 62908344
Test: make
Change-Id: Ide61829cf99f15777c46f657a0e140d594f88243
2017-06-23 17:36:26 +01:00
Tomasz Wasilczyk
b8874e8cc1 Merge "Add SEPolicy for new Java-based Broadcast Radio service." 2017-06-22 23:07:51 +00:00
TreeHugger Robot
91e166bb60 Merge "Fix SELinux "could not set" errors." 2017-06-22 23:03:23 +00:00
Daniel Rosenberg
a1d4d05d67 Merge "Add rules for vfat for sdcardfs" am: b9bba83abc am: f26d79c561 am: 4e65fed1bf
am: 3f7f66b0ee

Change-Id: I3fc0cac7fdeab40bfa61f465a6d01d1d8c0c8d01
2017-06-22 21:46:08 +00:00
Dan Cashman
55c7750482 Update sepolicy 26.0 prebuilts again, again.
Bug: 37896931
Test: none, just prebuilt update.
Change-Id: I55b5179f98703026699a59cce4b2e1afb166fd1d
2017-06-22 14:32:21 -07:00
Daniel Rosenberg
3f7f66b0ee Merge "Add rules for vfat for sdcardfs" am: b9bba83abc am: f26d79c561
am: 4e65fed1bf

Change-Id: I9fd1ef32fde011d00e96555501f7665baf99fc26
2017-06-22 21:15:49 +00:00
Daniel Rosenberg
4e65fed1bf Merge "Add rules for vfat for sdcardfs" am: b9bba83abc
am: f26d79c561

Change-Id: I0c1a79082955faeebe8cf70bb408928479117aad
2017-06-22 21:11:45 +00:00
Daniel Rosenberg
f26d79c561 Merge "Add rules for vfat for sdcardfs"
am: b9bba83abc

Change-Id: I2fb029b770d53bacbe8dd11a69cee5e70b6ef2e9
2017-06-22 21:07:44 +00:00
Treehugger Robot
b9bba83abc Merge "Add rules for vfat for sdcardfs" 2017-06-22 21:01:25 +00:00
Joel Galenson
ec22dad6cf Fix SELinux "could not set" errors.
A previous commit reverted us back to using file_contexts
instead of genfs_contexts but did not remove the new
genfs_contexts rules, which caused this problem.

Bug: 62901680
Test: Verified that the errors do not apepar and that wifi
and traceur work.

Change-Id: Ic0078dc3a2a9d3d35a10599239fdf9fa478f1e2b
2017-06-22 10:34:24 -07:00
TreeHugger Robot
1b5504b2d7 Merge "Revert "Remove neverallow preventing hwservice access for apps."" 2017-06-22 17:16:32 +00:00
Tomonori Nanbu
f707bda8ad Merge "Add sepolicy for hal_wifi to access /proc/modules" am: 6acd70b918 am: ded0b58d62 am: 9d86e622e3
am: b9621bbacc

Change-Id: I001be0f05e59e55dcedb159ec86a5bf386fa89c7
2017-06-22 15:56:23 +00:00
Tomonori Nanbu
b9621bbacc Merge "Add sepolicy for hal_wifi to access /proc/modules" am: 6acd70b918 am: ded0b58d62
am: 9d86e622e3

Change-Id: Ib83f52f4dae096d42dedf17898cf20d8c3923f2e
2017-06-22 15:51:01 +00:00
Tomonori Nanbu
9d86e622e3 Merge "Add sepolicy for hal_wifi to access /proc/modules" am: 6acd70b918
am: ded0b58d62

Change-Id: I574e60486bb12214e33a8e9aabf7794d4ebc0b1a
2017-06-22 15:45:20 +00:00
Tomonori Nanbu
ded0b58d62 Merge "Add sepolicy for hal_wifi to access /proc/modules"
am: 6acd70b918

Change-Id: Ia4a4ffdf43cb1641785e18f9aad7ca96b5d45ab9
2017-06-22 15:41:23 +00:00
Treehugger Robot
6acd70b918 Merge "Add sepolicy for hal_wifi to access /proc/modules" 2017-06-22 15:35:14 +00:00
Tomasz Wasilczyk
38f0928fb0 Add SEPolicy for new Java-based Broadcast Radio service.
Bug: b/36863239
Test: manual
Change-Id: I7e929926efbb1570ea9723ef3810a511c71dc11a
2017-06-22 07:55:16 -07:00
Jaegeuk Kim
641cde6458 file_contexts: allow to run make_f2fs during initial boot-up
Change-Id: I951162a6a118757d7a466f2c19a23d0ad2e406e3
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-06-21 21:08:57 -07:00
Sandeep Patil
0d477e3d56 Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev am: 0e0ed156ea am: 65ffb0657f
am: bc6271bc6b

Change-Id: I2915ce7ffa3f11d07c26a32b2d9b2d463a3c21f4
2017-06-22 00:44:01 +00:00
Sandeep Patil
63475b084c Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev am: 0e0ed156ea am: ed27bec522
am: 9f5801de50

Change-Id: I5861f5464762ddea8c6a39cb3968d73017d9767d
2017-06-22 00:43:46 +00:00
Sandeep Patil
bc6271bc6b Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev am: 0e0ed156ea
am: 65ffb0657f

Change-Id: I4b3f0207400200d19f8e055ec35d518f0951d235
2017-06-22 00:41:36 +00:00
Sandeep Patil
9f5801de50 Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev am: 0e0ed156ea
am: ed27bec522

Change-Id: Idac884677a3304144801a4929651c1ba1199a8b8
2017-06-22 00:40:47 +00:00
Sandeep Patil
ed27bec522 Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev
am: 0e0ed156ea

Change-Id: I8ec0c46355507e8c1a7d10c53805eb350ebbe6a5
2017-06-22 00:38:43 +00:00
Sandeep Patil
65ffb0657f Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev
am: 0e0ed156ea

Change-Id: Ic73d84dacc95d5b902dc6c9530b98e53d71574f1
2017-06-22 00:37:47 +00:00
TreeHugger Robot
0e0ed156ea Merge "Revert "Annotate rild with socket_between_core_and_vendor_violators"" into oc-dev 2017-06-22 00:35:08 +00:00
Daniel Rosenberg
8a65aeca0e Add rules for vfat for sdcardfs
This adds parellel rules to the ones added for media_rw_data_file
to allow apps to access vfat under sdcardfs. This should be reverted
if sdcardfs is modified to alter the secontext it used for access to
the lower filesystem

Change-Id: Idb123206ed2fac3ead88b0c1ed0b66952597ac65
Bug: 62584229
Test: Run android.appsecurity.cts.ExternalStorageHostTest with
      an external card formated as vfat
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2017-06-22 00:20:59 +00:00
Dan Cashman
ceed720415 Revert "Remove neverallow preventing hwservice access for apps."
This reverts commit 3e307a4de5.

Test: Builds - neverallow change only.
Bug: 62806062
Change-Id: Id3aa1b425cf48fc8586890c9850a74594584922d
2017-06-21 16:55:49 -07:00
Jeff Vander Stoep
8bc3ab47c0 Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev am: 6351c374c2 am: 319d70993d
am: b24567f45f

Change-Id: Ib51077433505dfb09c9a4519235ab3b51f22d149
2017-06-21 23:37:28 +00:00
Jeff Vander Stoep
fa50e80ba6 Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev am: 6351c374c2 am: d9301ac6fa
am: aae5c4c8c5

Change-Id: Id94e113b5a5621b39420294eec1e7fd9e1bc1c42
2017-06-21 23:37:11 +00:00
Jeff Vander Stoep
b24567f45f Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev am: 6351c374c2
am: 319d70993d

Change-Id: Ifcb3c7111dbb840041d1244caa6afebfbeb1cde7
2017-06-21 23:35:34 +00:00
Jeff Vander Stoep
aae5c4c8c5 Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev am: 6351c374c2
am: d9301ac6fa

Change-Id: I4b272a59a7e48e1f0f15ddd1acb7e8f6b836ca40
2017-06-21 23:34:41 +00:00
Jeff Vander Stoep
d9301ac6fa Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev
am: 6351c374c2

Change-Id: I6e661aa37702c36e9003dcf41dbed4b754122c87
2017-06-21 23:32:08 +00:00
Jeff Vander Stoep
319d70993d Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev
am: 6351c374c2

Change-Id: I16cbe7b654532367829a0df2dcfa929c38e547fd
2017-06-21 23:31:12 +00:00
TreeHugger Robot
6351c374c2 Merge "Exempt tetheroffload hal from network socket restrictions" into oc-dev 2017-06-21 23:26:22 +00:00
Sandeep Patil
3a9391152f Revert "Annotate rild with socket_between_core_and_vendor_violators"
This reverts commit 57e9946fb7.

Bug: 62616897
Test: choosecombo 1 aosp_arm64_ab userdebug; m -j 80 The build should
    not break.

Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-06-21 15:30:56 -07:00
Dan Cashman
a503819df5 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5 am: 317c4171d2
am: e51e613184

Change-Id: I153a14af008e52fbe6677007e0e1ad4e472be3da
2017-06-21 21:45:13 +00:00
Dan Cashman
a030f3e288 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5 am: 044d20729b
am: 11dcf1976f

Change-Id: I96b2af315b4c35ddd47315f3ca4a9b098eab1d59
2017-06-21 21:44:54 +00:00
Dan Cashman
e51e613184 Remove neverallow preventing hwservice access for apps. am: 3e307a4de5
am: 317c4171d2

Change-Id: I418cc929f8e0a698220e0b8b1c51314ef9ea52a8
2017-06-21 21:41:36 +00:00
Dan Cashman
11dcf1976f Remove neverallow preventing hwservice access for apps. am: 3e307a4de5
am: 044d20729b

Change-Id: Ia6f8a806adae230df50f8d06edcf4ba9d2ae4352
2017-06-21 21:41:10 +00:00
Dan Cashman
044d20729b Remove neverallow preventing hwservice access for apps.
am: 3e307a4de5

Change-Id: Ic144d924948d7b8e73939806d761d27337dbebef
2017-06-21 21:38:19 +00:00
Dan Cashman
317c4171d2 Remove neverallow preventing hwservice access for apps.
am: 3e307a4de5

Change-Id: I90e567c8138fa75bf792af181890d0af627b6f48
2017-06-21 21:37:32 +00:00
Jeff Vander Stoep
d75a2c0cc8 Exempt tetheroffload hal from network socket restrictions
The tetheroffload hal must be able to use network sockets as part of
its job.

Bug: 62870833
Test: neverallow-only change builds.
Change-Id: I630b36340796a5ecb5db08e732b0978dd82835c7
2017-06-21 12:46:21 -07:00