Commit graph

997 commits

Author SHA1 Message Date
Joel Galenson
312c3800b8 Simplify genfs labeling of tracefs.
The code used to look like this, but in commit
4cae28d43c we replaced the generic
regexes to improve performance.  Now that we've switched to genfs,
this no longer affects performance, so let's simplify the labeling.

Bug: 62413700
Test: Built, flashed, and booted two devices.  Verified that all of
the files have the correct context and that wifi, camera, and traceur
work.

Change-Id: I1a859d17075fa25543ee090cc7a7478391bc45c1
2017-07-05 12:39:27 -07:00
Joel Galenson
cd3c5d3524 Move file labeling to genfs_contexts.
This should slightly improve performance, as file_contexts is slower
than genfs_contexts.

Now that the kernel patch enabling genfs labeling of tracefs has
landed, we can re-enable this.

Bug: 62413700
Test: Built, flashed, and booted two devices.  Verified that all of
the files have the correct context and that wifi, camera, and traceur
work.

Change-Id: Ifc1c6ac634b94e060ed1f311049bd37f6fcc8313
2017-07-05 19:28:11 +00:00
Jeff Vander Stoep
8d959fc999 domain_deprecated: remove ion access am: 88e4be54a6 am: 8745ac4363 am: c8338f2669
am: efb5a5ba15

Change-Id: Ie2461f25e7ac409837c84d7f467b63d4f23d918f
2017-07-03 02:55:01 +00:00
Jeff Vander Stoep
efb5a5ba15 domain_deprecated: remove ion access am: 88e4be54a6 am: 8745ac4363
am: c8338f2669

Change-Id: Id3db0306763ca605dcdf11409f3b591d6ceda312
2017-07-03 02:51:59 +00:00
Jeff Vander Stoep
8745ac4363 domain_deprecated: remove ion access
am: 88e4be54a6

Change-Id: I064f2becfde44f300ddf9d36802972b35c54e152
2017-07-03 02:46:30 +00:00
Jeff Vander Stoep
96f0e1fd6c Remove more domain_deprecated permissions am: e39d5c875e am: 9ce812fbe0 am: 685db0b279
am: 4b7aa90918

Change-Id: I222af35247d5fc4d99f2cdeca79f86cd0a815739
2017-07-01 14:48:57 +00:00
Jeff Vander Stoep
4b7aa90918 Remove more domain_deprecated permissions am: e39d5c875e am: 9ce812fbe0
am: 685db0b279

Change-Id: I5c4ae29b9623ee04f0409c5f2e4da9fb325a430f
2017-07-01 14:43:57 +00:00
Jeff Vander Stoep
9ce812fbe0 Remove more domain_deprecated permissions
am: e39d5c875e

Change-Id: Ibdb49f80b11fca40f5c4de7a92780be26b3280eb
2017-07-01 14:33:56 +00:00
Jeff Vander Stoep
6f842f8aea Merge "Remove adbd tcontexts from domain_deprecated" am: 056710b38a am: 2af7c84fac am: 1a1cefcc96
am: 902dbafbe8

Change-Id: I2b0c214e4e6842c7e9eb56a28d014c814a9c8670
2017-07-01 13:08:52 +00:00
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
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
20a319de4d Merge "file_contexts: allow to run make_f2fs during initial boot-up" 2017-07-01 08:06:24 +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
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
Jeff Vander Stoep
0f697a7e88 Merge "hal_tetheroffload: Grant permissions" into oc-dr1-dev am: 243c46cc46
am: 6907f57417

Change-Id: I2b073252ccdcd30fce523a83ba43dea14eeaad3b
2017-06-29 04:36:30 +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
TreeHugger Robot
724e825a62 Merge "cas: add CAS hal and switch to use hwservice" 2017-06-28 20:37:18 +00:00
TreeHugger Robot
1c93a40bbf Merge "Sepolicy: Give asan_extract access to powerctl" 2017-06-28 00:55:13 +00:00
TreeHugger Robot
412d4ef00a Merge "remove /dev/log" 2017-06-27 23:21:16 +00:00
TreeHugger Robot
e93d6eef53 Merge "Add /dev/kmsg_debug." 2017-06-27 23:21:07 +00:00
Andreas Gampe
8c7514adb1 Sepolicy: Give asan_extract access to powerctl
rc-style powerctl has beem removed. Accordingly, asan_extract now
needs access to sys.powerctl directly.

(orginally commit: 8267208921)

Bug: 36458146
Bug: 38241921
Test: Builds and boots.
Change-Id: I7d6e583f5e98b671986a2071abf157c86e288a10
2017-06-27 15:38:29 -07:00
Jeff Vander Stoep
3d09e12153 Merge "dexoptanalyzer: suppress access(2) denial" into oc-dr1-dev am: 7b065f82a7
am: eebc36eb3a

Change-Id: I6e6e31e8d25a797d200bbf4c6f5ad32c491322cb
2017-06-27 20:38:24 +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
Neil Fuller
e226b96e7c Revert "DO NOT MERGE. Revert "Enable the TimeZoneManagerService""
This reinstates the selinux changes for the timezone service that
were reverted on oc-dr1-dev and undesirably merged down to master.

This reverts commit 96c619c826.

Test: make
Bug: 31008728
Change-Id: Ief2129c409de09b2782881a6556d918af59badd9
2017-06-27 19:32:16 +01:00
Tom Cherry
cfc625d14a remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the sepolicy now too.

(Originally submitted in commit: 8c60f74dcc)

Bug: 38242876
Test: Builds and boots.

Change-Id: I4caa0dbf77956fcbc61a07897242b951c275b502
2017-06-27 10:10:22 -07:00
Josh Gao
3458ec135e Add /dev/kmsg_debug.
Add /dev/kmsg_debug on userdebug devices, to allow crash_dump to log
crashes to dmesg when logd isn't up yet (or is the one crashing).

(Originally commited in a015186fab)
Bug: 36574794
Bug: 62101480
Test: Builds and boots.
Change-Id: I249e11291c58fee77098dec3fd3271ea23363ac9
2017-06-27 07:20:44 -07:00
Stephen Smalley
2d1927595e Define smc_socket security class. am: 2be9799bcc am: 52909aca44 am: ad01d1f6ab
am: 06a22e41fe

Change-Id: Ib3549463537470e9af49cc4b1e6b2a526c2a9c76
2017-06-27 01:13:29 +00:00
Stephen Smalley
13a9dfbe81 Merge "Define getrlimit permission for class process" am: e02e0ad1cc am: a77096b02a am: 021b5e9321
am: 63ad602ce5

Change-Id: I50e8082649aa2cf166d4c6a79766a8a39b78f722
2017-06-27 01:13:09 +00: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
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
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
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
Tomasz Wasilczyk
2e8e98af27 Merge "Remove previous implementation of RadioService." 2017-06-26 20:58:47 +00: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
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
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