Commit graph

11750 commits

Author SHA1 Message Date
Andres Oportus
2f0d04962a Merge "Allow only system_server to read uid_time_in_state" am: 439364d20e am: e96aad0998
am: 3ce2c6f866

Change-Id: Ic54d118a477d1827952e1c54216ff01838d985d7
2017-07-01 13:04:04 +00:00
Jeff Vander Stoep
902dbafbe8 Merge "Remove adbd tcontexts from domain_deprecated" am: 056710b38a am: 2af7c84fac
am: 1a1cefcc96

Change-Id: I93ad1ad5f769f68c856e7a3cfcc0bcd8792633f2
2017-07-01 13:03:51 +00:00
Andres Oportus
3ce2c6f866 Merge "Allow only system_server to read uid_time_in_state" am: 439364d20e
am: e96aad0998

Change-Id: I0742836c6b613afeab2dcf6d59c37dd9787dc91a
2017-07-01 12:59:05 +00:00
Jeff Vander Stoep
1a1cefcc96 Merge "Remove adbd tcontexts from domain_deprecated" am: 056710b38a
am: 2af7c84fac

Change-Id: Id52f1fd3e79a0a36df42abca24c93b28b277c570
2017-07-01 12:58:51 +00:00
Andres Oportus
e96aad0998 Merge "Allow only system_server to read uid_time_in_state"
am: 439364d20e

Change-Id: I726672b2e3379e2e53d3c6b26482147f11d06d8e
2017-07-01 12:54:07 +00:00
Jeff Vander Stoep
2af7c84fac Merge "Remove adbd tcontexts from domain_deprecated"
am: 056710b38a

Change-Id: Id44e16b03b1b5398bb4fd73bc4950e5da8acd5b7
2017-07-01 12:53:51 +00:00
Treehugger Robot
439364d20e Merge "Allow only system_server to read uid_time_in_state" 2017-07-01 12:48:41 +00:00
Treehugger Robot
056710b38a Merge "Remove adbd tcontexts from domain_deprecated" 2017-07-01 12:47:40 +00:00
Jeff Vander Stoep
4d5721a5a3 Remove adbd tcontexts from domain_deprecated
Logs indicate apps, system_server, and runas are the only
domains that require this permission.

Bug: 28760354
Test: check logs.
Change-Id: I93dc53ec2d892bb91c0cd6f5d7e9cbf76b9bcd9f
2017-07-01 06:30:58 +00:00
Andres Oportus
97b955de13 Allow only system_server to read uid_time_in_state
Bug: 62706738
Bug: 34133340
Test: Check that uid_time_in_state can't be read from
the shell without root permissions and that
"dumpsys batterystats --checkin| grep ctf" shows frequency
data (system_server was able to read uid_time_in_state)

Change-Id: Ic6a54da4ebcc9e10b0e3af8f14a45d7408e8686e
(cherry picked from commit 4dc88795d0)
2017-06-30 22:07:57 -07:00
Jeff Vander Stoep
3afd02581a dexoptanalyzer: suppress access(2) denial am: 06aee357e4 am: e8bf363d3f
am: 2d74ecde52

Change-Id: I553c794c40406da42f36d64fdd84684d157bccad
2017-06-30 23:57:38 +00:00
Jeff Vander Stoep
2d74ecde52 dexoptanalyzer: suppress access(2) denial am: 06aee357e4
am: e8bf363d3f

Change-Id: Ic3e7a595e2878becc5ecf81631e8088f487c51e2
2017-06-30 23:52:36 +00:00
Jeff Vander Stoep
e8bf363d3f dexoptanalyzer: suppress access(2) denial
am: 06aee357e4

Change-Id: Ib49585b7e3a39969ebc23113c2b3ccdb04602cb5
2017-06-30 23:48:06 +00:00
Jeff Vander Stoep
06aee357e4 dexoptanalyzer: suppress access(2) denial
A legitimate call to access(2) is generating a denial. Use the
audit_access permission to suppress the denial on just the access()
call.

avc: denied { write } for name="verified_jars"
scontext=u:r:dexoptanalyzer:s0
tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir

Bug: 62597207
Test: build policy
Test: The following cmd succeeds but no longer generates a denial
    adb shell cmd package compile -r bg-dexopt --secondary-dex \
    com.google.android.googlequicksearchbox

Change-Id: I7d03df2754c24c039bce11426bf8f317232f5e5f
(cherry picked from commit 575e627081)
2017-06-30 15:30:06 -07:00
Narayan Kamath
c88753c1da Merge "DO NOT MERGE ANYWHERE Revert "SEPolicy: Changes for new stack dumping scheme."" into oc-dr1-dev
am: 4f0776560a  -s ours

Change-Id: Ife60e3ca9dd346ca927e1fafdceef2fe71d33499
2017-06-30 18:10:12 +00:00
TreeHugger Robot
4f0776560a Merge "DO NOT MERGE ANYWHERE Revert "SEPolicy: Changes for new stack dumping scheme."" into oc-dr1-dev 2017-06-30 18:02:16 +00:00
Jeff Vander Stoep
6907f57417 Merge "hal_tetheroffload: Grant permissions" into oc-dr1-dev
am: 243c46cc46

Change-Id: I08aa08c6e23c0e78569d06c4e4e36a27dd861459
2017-06-29 04:32:30 +00:00
TreeHugger Robot
243c46cc46 Merge "hal_tetheroffload: Grant permissions" into oc-dr1-dev 2017-06-29 04:26:11 +00:00
Jeff Vander Stoep
e58a8de5e7 hal_tetheroffload: Grant permissions
avc: denied { read write } scontext=u:r:ipacm:s0
tcontext=u:r:system_server:s0 tclass=netlink_netfilter_socket
avc: denied { setopt } scontext=u:r:ipacm:s0
tcontext=u:r:system_server:s0 tclass=netlink_netfilter_socket
avc: denied { getattr } scontext=u:r:ipacm:s0
tcontext=u:r:system_server:s0 tclass=netlink_netfilter_socket
avc: denied { create } for scontext=u:r:system_server:s0
tcontext=u:r:system_server:s0 tclass=netlink_netfilter_socket

Bug: 29337859
Bug: 32163131
Test: adb shell getenforce
Enforcing
adb shell dumpsys connectivity tethering
Tethering:
  ...
  Log:
    ...
    06-28 11:46:58.841 - SET master tether settings: ON
    06-28 11:46:58.857 - [OffloadController] tethering offload started
And logs show some signs of happiness:
    06-28 11:46:58.853   816   947 I IPAHALService: IPACM was provided two FDs (18, 19)
    06-28 11:46:58.853  1200  1571 I zygote64: Looking for service android.hardware.tetheroffload.control@1.0::IOffloadControl/default
Change-Id: I0c63bd2de334b4ca40e54efb9df4ed4904667e21
2017-06-29 04:24:14 +00:00
Jeff Vander Stoep
cbe69fe83e Merge "Suppress su access to pdx sockets" into oc-dr1-dev
am: ae548746dc

Change-Id: Ie16d24ad9e950e279ca79ba89ec1aaf4ab273ef5
2017-06-27 22:25:59 +00:00
TreeHugger Robot
ae548746dc Merge "Suppress su access to pdx sockets" into oc-dr1-dev 2017-06-27 22:21:27 +00:00
Jeff Vander Stoep
eebc36eb3a Merge "dexoptanalyzer: suppress access(2) denial" into oc-dr1-dev
am: 7b065f82a7

Change-Id: I82e82541eac5abd668fdc4b94324bc17d753a768
2017-06-27 20:29:53 +00:00
TreeHugger Robot
7b065f82a7 Merge "dexoptanalyzer: suppress access(2) denial" into oc-dr1-dev 2017-06-27 20:20:15 +00:00
Jeff Vander Stoep
4b7cf4fba1 Suppress su access to pdx sockets
Su runs in permissive mode and denials should be suppressed.

avc: denied { getattr } for scontext=u:r:su:s0
tcontext=u:object_r:pdx_display_client_endpoint_socket:s0
tclass=unix_stream_socket permissive=1
avc: denied { getattr } for scontext=u:r:su:s0
tcontext=u:object_r:pdx_display_manager_endpoint_socket:s0
tclass=unix_stream_socket permissive=1
avc: denied { getattr } for scontext=u:r:su:s0
tcontext=u:object_r:pdx_display_vsync_endpoint_socket:s0
tclass=unix_stream_socket permissive=1
avc: denied { getattr } for scontext=u:r:su:s0
tcontext=u:object_r:pdx_bufferhub_client_endpoint_socket:s0
tclass=unix_stream_socket permissive=1
avc: denied { getattr } for scontext=u:r:su:s0
tcontext=u:object_r:pdx_performance_client_endpoint_socket:s0
tclass=unix_stream_socket permissive=1

Bug: 35197529
Test: policy builds
Change-Id: Ia643c6e776e5e5bd473d857d523c3be91d32c40a
2017-06-26 16:33:14 -07:00
Stephen Smalley
06a22e41fe Define smc_socket security class. am: 2be9799bcc am: 52909aca44
am: ad01d1f6ab

Change-Id: Ia8a0f7b4378f6e66a148dcbd4d55fcb8f66f4176
2017-06-26 22:18:08 +00:00
Stephen Smalley
63ad602ce5 Merge "Define getrlimit permission for class process" am: e02e0ad1cc am: a77096b02a
am: 021b5e9321

Change-Id: Ia9a2a2313f34a826a02d1eeff568f3afc565714c
2017-06-26 22:17:56 +00:00
Stephen Smalley
ad01d1f6ab Define smc_socket security class. am: 2be9799bcc
am: 52909aca44

Change-Id: I613dc32aac4b3276924717e8066fd2cd229b81ec
2017-06-26 22:14:20 +00:00
Stephen Smalley
021b5e9321 Merge "Define getrlimit permission for class process" am: e02e0ad1cc
am: a77096b02a

Change-Id: I2719cfbcf0e6ce58c4953602e2113bd6fe1ce0cd
2017-06-26 22:14:08 +00:00
Jeff Vander Stoep
575e627081 dexoptanalyzer: suppress access(2) denial
A legitimate call to access(2) is generating a denial. Use the
audit_access permission to suppress the denial on just the access()
call.

avc: denied { write } for name="verified_jars"
scontext=u:r:dexoptanalyzer:s0
tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir

Bug: 62597207
Test: build policy
Test: The following cmd succeeds but no longer generates a denial
    adb shell cmd package compile -r bg-dexopt --secondary-dex \
    com.google.android.googlequicksearchbox

Change-Id: I7d03df2754c24c039bce11426bf8f317232f5e5f
2017-06-26 15:08:37 -07:00
Jeff Vander Stoep
b9ebea0129 Add another extraneous neverallow rule to force attribute inclusion am: c75aa50d5d
am: e3c7880ef5

Change-Id: I12b1554b203ae27596415b5466d159100c5e5611
2017-06-26 22:05:23 +00:00
Jeff Vander Stoep
f962aa620e Add another extraneous neverallow rule to force attribute inclusion am: c75aa50d5d
am: a128aca6c9

Change-Id: I5432110e7e009c29b27dee40c543203c1b17059a
2017-06-26 22:03:06 +00:00
Stephen Smalley
52909aca44 Define smc_socket security class.
am: 2be9799bcc

Change-Id: If42bc0d3fc50db8294c8a9fd083d915b8e47a95e
2017-06-26 22:02:28 +00:00
Stephen Smalley
a77096b02a Merge "Define getrlimit permission for class process"
am: e02e0ad1cc

Change-Id: I67eea67d667005d5ac357e1131a319ed57b33894
2017-06-26 22:02:12 +00:00
Jeff Vander Stoep
a128aca6c9 Add another extraneous neverallow rule to force attribute inclusion
am: c75aa50d5d

Change-Id: I39eecd67a97de193d53ab298a1ef3e8443bb9391
2017-06-26 22:00:37 +00:00
Jeff Vander Stoep
e3c7880ef5 Add another extraneous neverallow rule to force attribute inclusion
am: c75aa50d5d

Change-Id: I91bbecf1b60944fb43022dcc5f5ffe452b713193
2017-06-26 22:00:37 +00:00
Stephen Smalley
2be9799bcc Define smc_socket security class.
Linux kernel commit da69a5306ab9 ("selinux: support distinctions among all
network address families") triggers a build error if a new address family
is added without defining a corresponding SELinux security class.  As a
result, the smc_socket class was added to the kernel to resolve a build
failure as part of merge commit 3051bf36c25d that introduced AF_SMC circa
Linux 4.11.  Define this security class and its access vector, add
it to the socket_class_set macro, and exclude it from webview_zygote
like other socket classes.

Test:  Policy builds

Change-Id: Idbb8139bb09c6d1c47f1a76bd10f4ce1e9d939cb
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2017-06-26 21:44:58 +00:00
Treehugger Robot
e02e0ad1cc Merge "Define getrlimit permission for class process" 2017-06-26 21:40:18 +00:00
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
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
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
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
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