Commit graph

17131 commits

Author SHA1 Message Date
Howard Ro
40b360d616 Merge "Update sepolicies for stats hal" 2018-09-28 19:52:14 +00:00
Wei Wang
409cd304cd Allow traceur to call atrace HAL am: da427a33c9 am: 6da1e5f293
am: f5c58c352c

Change-Id: I10d3b82e0e843aad1505b022f68bc971edfe205d
2018-09-27 19:38:01 -07:00
Wei Wang
f5c58c352c Allow traceur to call atrace HAL am: da427a33c9
am: 6da1e5f293

Change-Id: If93ff3aacfe8473ecf79a3a2e3f7c9f491c09436
2018-09-27 19:33:57 -07:00
Wei Wang
6da1e5f293 Allow traceur to call atrace HAL
am: da427a33c9

Change-Id: I082f2997b3a0df019cd0902c41f372ef0cd886b3
2018-09-27 19:28:52 -07:00
Wei Wang
a636a692cd Add atrace HAL 1.0 sepolicy am: bc71a6109e am: a15a0804bc
am: 8ac8d0e909

Change-Id: If8d07ce750b54c812ba5e96c0bb1bf525bca6024
2018-09-27 16:39:45 -07:00
Wei Wang
8ac8d0e909 Add atrace HAL 1.0 sepolicy am: bc71a6109e
am: a15a0804bc

Change-Id: I8c4cdb0558b1fcfc856b4eb858e5a5baf0ec3d60
2018-09-27 16:35:33 -07:00
Wei Wang
a15a0804bc Add atrace HAL 1.0 sepolicy
am: bc71a6109e

Change-Id: Iad34b6a0a8e4a9b885244804e07c93bc79f8731b
2018-09-27 16:27:11 -07:00
Wei Wang
da427a33c9 Allow traceur to call atrace HAL
Bug: 116783882
Bug: 111098596
Test: turn on/off system_tracing
Change-Id: I089851924bdb1a5cd71598a7014d17fedc87625a
2018-09-27 23:18:49 +00:00
Wei Wang
bc71a6109e Add atrace HAL 1.0 sepolicy
Bug: 111098596
Test: atrace/systrace

(cherry picked from commit 9ed5cf6e43)

Change-Id: I97772ff21754d03a0aea0d53b39e8da5312a17c0
2018-09-27 23:18:29 +00:00
Howard Ro
9f9af0dbd2 Update sepolicies for stats hal
Bug: 116732452
Test: no sepolicy violations observed with this change
Change-Id: I1958182dd8ecc496625da2a2a834f71f5d43e7bb
2018-09-27 15:54:49 -07:00
Nick Kralevich
59886f2047 Introduce system_file_type am: 5e37271df8 am: dcd05ff6ef
am: 3b229087c0

Change-Id: I502f8069f55ce9eafab76448409d30825620c53c
2018-09-27 15:45:25 -07:00
Nick Kralevich
1723b3d531 Label /system/usr/share/zoneinfo differently am: ff1c765ff2 am: 2a63803348
am: 5e40f6748b

Change-Id: I01960bfac3842a4f4ea2d924ccc3c1eaa0213429
2018-09-27 15:45:04 -07:00
Nick Kralevich
3b229087c0 Introduce system_file_type am: 5e37271df8
am: dcd05ff6ef

Change-Id: Id9308e571eefeeeb0ccee4bd6b9389856a15e8ab
2018-09-27 15:36:06 -07:00
Nick Kralevich
5e40f6748b Label /system/usr/share/zoneinfo differently am: ff1c765ff2
am: 2a63803348

Change-Id: I5b618bddff425230da3fc6924b9fcd9a21654aa5
2018-09-27 15:35:50 -07:00
Nick Kralevich
dcd05ff6ef Introduce system_file_type
am: 5e37271df8

Change-Id: Ifc1a373f8aacb6b519b71dd23ec05b7c86f15e36
2018-09-27 15:28:16 -07:00
Nick Kralevich
2a63803348 Label /system/usr/share/zoneinfo differently
am: ff1c765ff2

Change-Id: I8765a406f9d075c76235220b68fd7dc79a15d12a
2018-09-27 15:28:03 -07:00
Nick Kralevich
5e37271df8 Introduce system_file_type
system_file_type is a new attribute used to identify files which exist
on the /system partition. It's useful for allow rules in init, which are
based off of a blacklist of writable files. Additionally, it's useful
for constructing neverallow rules to prevent regressions.

Additionally, add commented out tests which enforce that all files on
the /system partition have the system_file_type attribute. These tests
will be uncommented in a future change after all the device-specific
policies are cleaned up.

Test: Device boots and no obvious problems.
Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
2018-09-27 12:52:09 -07:00
Nick Kralevich
ff1c765ff2 Label /system/usr/share/zoneinfo differently
/system/usr/share/zoneinfo is currently labeled zoneinfo_data_file,
a label shared with /data/misc/zoneinfo. However, each of these
directory locations has different security characteristics. In
particular, the files in /system/usr/share/zoneinfo must never be
writable, whereas /data/misc/zoneinfo may be written to by system_server.
Reusing the same label hides these different security characteristics.

Create a separate label for /system/usr/share/zoneinfo.

Test: Device boots and no obvious problems.
Change-Id: I8cf16ff038b06b38f77388e546d9b7a6865f7879
2018-09-27 10:18:40 -07:00
huangyanjun
9521eb1886 Merge "Fix building error for multi-line dontaudit statement" am: 0e0feac01b am: d13dcc55fb
am: 73d9ba325e

Change-Id: Ie2f045ba6ddf8f89e4bac64c784300b2328dbebe
2018-09-27 10:15:12 -07:00
huangyanjun
73d9ba325e Merge "Fix building error for multi-line dontaudit statement" am: 0e0feac01b
am: d13dcc55fb

Change-Id: I31945be0e5fd8312b292e2a8aef03f960713de55
2018-09-27 09:49:32 -07:00
huangyanjun
d13dcc55fb Merge "Fix building error for multi-line dontaudit statement"
am: 0e0feac01b

Change-Id: I80d98118dc0fe1e15ef4c707ad0d10076d905767
2018-09-27 09:43:27 -07:00
Treehugger Robot
0e0feac01b Merge "Fix building error for multi-line dontaudit statement" 2018-09-27 16:29:39 +00:00
Nick Kralevich
3e55b81b6c Merge "gracefully handle hashtab_search failures" am: 91bde1d771 am: 43aa650ca3
am: 7f528e0534

Change-Id: Ie547233a35c1dc7678bf2b625f03656966690932
2018-09-26 21:52:18 -07:00
Nick Kralevich
7f528e0534 Merge "gracefully handle hashtab_search failures" am: 91bde1d771
am: 43aa650ca3

Change-Id: I0e9b5ffd9a75342ef3f7e194db14ac461917bada
2018-09-26 21:36:46 -07:00
Nick Kralevich
43aa650ca3 Merge "gracefully handle hashtab_search failures"
am: 91bde1d771

Change-Id: I2d2b2994435deb609e0c69417b9b55eccffbe7a5
2018-09-26 21:21:23 -07:00
Treehugger Robot
91bde1d771 Merge "gracefully handle hashtab_search failures" 2018-09-27 02:21:11 +00:00
Nick Kralevich
4144615f0a system_linker_exec: Remove exec_type am: dbddbe42d2 am: bca68b0d27
am: f39c49b41f

Change-Id: I30c38454497f5810949fa76d8024921c0c106e3a
2018-09-26 16:57:51 -07:00
Nick Kralevich
f39c49b41f system_linker_exec: Remove exec_type am: dbddbe42d2
am: bca68b0d27

Change-Id: I917b1ca8155c7257aad45b58109663fd04eebe10
2018-09-26 16:53:42 -07:00
Nick Kralevich
bca68b0d27 system_linker_exec: Remove exec_type
am: dbddbe42d2

Change-Id: I0acdc675e3f2c3038bd73b6c8571099dc612c196
2018-09-26 16:49:33 -07:00
Nick Kralevich
bb880a2826 gracefully handle hashtab_search failures
Otherwise we crash on a null pointer exception.

Test: Reference a non-existent type in test code and make sure
    the test doesn't crash.

Change-Id: I5839d2740d51c0df7a8909a3f8430850ae1b2675
2018-09-26 14:28:44 -07:00
Nick Kralevich
dbddbe42d2 system_linker_exec: Remove exec_type
system/sepolicy/public/attributes defines exec_type as:

  # All types used for domain entry points.
  attribute exec_type;

The linker is not a standalone executable, but rather, used by other
executables to resolve shared libraries. It isn't, and must never be, an
allowed entrypoint for a domain.

Remove the exec_type attribute from system_linker_exec.

Test: Device compiles and boots, no obvious problems running the system.
Change-Id: I8f2f608bc1a642193524396f46b22933faac5468
2018-09-26 12:22:59 -07:00
huangyanjun
250957202f Fix building error for multi-line dontaudit statement
All the *.conf.dontaudit files are generated from *.conf
with the command of 'sed '/dontaudit/d' $@ > $@.dontaudit',
but this command can not be applied to multi-line dontaudit statement.

Test: Set plat_policy.conf.dontaudit as the input_file parameter of
checkpolicy tool, then selinux syntax error will occur during building.

Change-Id: I281de923d8a5f0b46256ec7de4df12a1c1d7e061
2018-09-26 20:42:27 +08:00
Wei Wang
9ed5cf6e43 Add atrace HAL 1.0 sepolicy
Bug: 111098596
Test: atrace/systrace
Change-Id: I06ca76750d640c98849c475c8a237d62c8e582b9
2018-09-25 21:02:10 -07:00
Nick Kralevich
b9d6c72e7f Android.mk: conditional compilation of odm_sepolicy.cil am: 1b2ea497aa am: 7913fb01e8
am: c8e489be83

Change-Id: Ia1bffa0026fc1e5fa4c4f2eee743dfa2545a83c0
2018-09-25 13:13:33 -07:00
Nick Kralevich
c8e489be83 Android.mk: conditional compilation of odm_sepolicy.cil am: 1b2ea497aa
am: 7913fb01e8

Change-Id: I06d55496bd49dbbe3f948215026c2323d874cfc7
2018-09-25 13:09:24 -07:00
Nick Kralevich
7913fb01e8 Android.mk: conditional compilation of odm_sepolicy.cil
am: 1b2ea497aa

Change-Id: I6410593a4f7616958ca8b6cc1ca37401bfc693a6
2018-09-25 13:04:44 -07:00
Nick Kralevich
1b2ea497aa Android.mk: conditional compilation of odm_sepolicy.cil
Do not attempt to build odm_sepolicy.cil if BOARD_ODM_SEPOLICY_DIRS is
not defined. Attempting to do so will create an empty file, which causes
build problems when
0c6ea1e812
is applied.

Test: "cd system/sepolicy && mma -j55" succeeds
Test: "make checkbuild" succeeds
Change-Id: Iefc458bddff3d08e5fcb86f8be3cad16d7e36e73
2018-09-25 11:03:48 -07:00
Tri Vo
677bc4a5ff Label /system/bin/linker* symlinks as system_file. am: 6cd9bd078a am: e4b212add6
am: 05eaccc4f7

Change-Id: I6fb5f5671477dd6d72bb67e53e40635786856a21
2018-09-24 18:48:24 -07:00
Tri Vo
05eaccc4f7 Label /system/bin/linker* symlinks as system_file. am: 6cd9bd078a
am: e4b212add6

Change-Id: Iba14e9eb1d216d9ffb474d8c593682dc0811777e
2018-09-24 18:37:17 -07:00
Tri Vo
e4b212add6 Label /system/bin/linker* symlinks as system_file.
am: 6cd9bd078a

Change-Id: Ifb50348dfec882414d228ef83630c7b4379426e8
2018-09-24 18:33:14 -07:00
Tri Vo
6cd9bd078a Label /system/bin/linker* symlinks as system_file.
Fixes:
avc: denied { read } for comm="init" name="linker_asan64" dev="sda22" ino=1833
scontext=u:r:init:s0 tcontext=u:object_r:system_linker_exec:s0 tclass=lnk_file
permissive=0

Bug: 116486312
Test: adb unroot && adb shell ls -l /system/bin/linker_asan
Change-Id: I754daaf3576e83d516cc9189b8be04dcc41bbc5c
2018-09-24 16:22:38 -07:00
Fan Xu
a4eff2bffb Update SELinux Policy for bufferhubd am: 26fa914cb2 am: cf728896d0
am: d46159e3b8

Change-Id: Iccfa94cfc550c63b26fb5bf0720fde5cea822f9c
2018-09-24 15:18:45 -07:00
Fan Xu
d46159e3b8 Update SELinux Policy for bufferhubd am: 26fa914cb2
am: cf728896d0

Change-Id: If0aec726ee0497ac2bbd41fdde57bb509cab2de4
2018-09-24 15:11:01 -07:00
Fan Xu
cf728896d0 Update SELinux Policy for bufferhubd
am: 26fa914cb2

Change-Id: I52b6787ca2ad04f003ec446ce8ac96e375f67c7b
2018-09-24 15:05:57 -07:00
Fan Xu
26fa914cb2 Update SELinux Policy for bufferhubd
Create a new service type buffer_hub_binder_service for
BufferHubBinderService and allow bufferhubd to publish the service.

Add the service to 26.0, 27.0 and 28.0 compat ignore files since the
service is not available in past versions.

Fixes: 116022258
Test: build passed

Change-Id: I5a21f00329ed474433d96c8d1ce32377f20cada3
2018-09-24 12:29:43 -07:00
Oleksiy Avramchenko
5d6501c3bd Merge "Add label for /system/bin/fsck.exfat" am: 06ddf4b44e am: 3faa2077f2
am: 699df8569f

Change-Id: Ief611ae21a42926415b632b4d6c7da18fd6753d3
2018-09-24 11:57:44 -07:00
Oleksiy Avramchenko
699df8569f Merge "Add label for /system/bin/fsck.exfat" am: 06ddf4b44e
am: 3faa2077f2

Change-Id: I50c124206a6604e84567641c35e1e5d8ea3c7e3a
2018-09-24 11:53:36 -07:00
Oleksiy Avramchenko
3faa2077f2 Merge "Add label for /system/bin/fsck.exfat"
am: 06ddf4b44e

Change-Id: Iedb3581e79540611798a4738bca937af4cbfd5c9
2018-09-24 11:47:33 -07:00
Treehugger Robot
06ddf4b44e Merge "Add label for /system/bin/fsck.exfat" 2018-09-24 18:38:45 +00:00
Jeff Vander Stoep
243f4d19b5 Further lock down app data am: 0b67bb88e5 am: 90e1c5bfdb
am: 903377eff9

Change-Id: I5ec26b7f0a7e781ad3e806b63c4a0ec963e21b2f
2018-09-24 09:50:33 -07:00