Commit Graph

12305 Commits

Author SHA1 Message Date
Jeff Vander Stoep
820f59a73c Merge "Allow recovery to read /proc/cmdline"
am: c9599b34d8

Change-Id: I403a945bcd0c8cb4892b11d1a817511f77e459e0
2017-10-04 21:45:51 +00:00
Treehugger Robot
dbe092538c Merge "Prepare python tests to be run in CTS" 2017-10-04 21:38:17 +00:00
Treehugger Robot
c9599b34d8 Merge "Allow recovery to read /proc/cmdline" 2017-10-04 21:35:19 +00:00
Nick Kralevich
69ec0f8f24 Drop isolated_app auditallow rule.
This functionality is being used, apparently.

Addresses the following auditallow spam:

  type=1400 audit(0.0:1039): avc: granted { write } for
  comm="Chrome_ProcessL"
  path="/storage/emulated/0/Android/data/com.bleacherreport.android.teamstream/cache/.com.google.Chrome.sk5n91"
  dev="sdcardfs" ino=1877565 scontext=u:r:isolated_app:s0:c512,c768
  tcontext=u:object_r:sdcardfs:s0 tclass=file

Test: policy compiles.
Bug: 32896414
Change-Id: I627e20c38115f1d579e78ca12abfa717d32a155a
2017-10-04 14:17:19 -07:00
Nick Kralevich
fc2449b4de tighten up some neverallow rules.
"append" has almost the same behavior as "write".

Test: policy compiles.
Change-Id: I3f85108e7918766f07e03f74c3f1d8e8084042b3
2017-10-04 14:09:51 -07:00
Jeff Vander Stoep
e629b7eb2d Allow recovery to read /proc/cmdline
avc:  denied  { read } for  pid=446 comm="recovery" name="cmdline"
dev="proc" scontext=u:r:recovery:s0
tcontext=u:object_r:proc_cmdline:s0 tclass=file

Test: build
Bug: 66497047
Change-Id: I9f48db88bed0d6ac76fa2808a4913857230a5d4b
2017-10-04 19:56:12 +00:00
Jeff Vander Stoep
3ca843a57d Prepare python tests to be run in CTS
Bug: 37008075
Test: build, all tests pass. Modify some attributes locally to
    cause tests to fail (verify that they are actually working).
Change-Id: If9f9ece61dff835f38ef9c8a57f5a7baddbae5cd
2017-10-04 19:46:12 +00:00
Jeff Vander Stoep
f2d1003c96 Merge "Move python sepolicy tests to embedded launcher"
am: 1e8804101b

Change-Id: Id10837bc2f664085bce86e236d9d2b7a6e5f8591
2017-10-04 18:26:02 +00:00
Treehugger Robot
1e8804101b Merge "Move python sepolicy tests to embedded launcher" 2017-10-04 18:19:58 +00:00
Tri Vo
4ba3328c9d Merge "Move update_engine rules out of update_engine_common.te"
am: 02580440cd

Change-Id: I9d772751cf8b03dc5ab0e68003d0d2dbd03568c8
2017-10-04 18:11:14 +00:00
Tri Vo
02580440cd Merge "Move update_engine rules out of update_engine_common.te" 2017-10-04 17:34:50 +00:00
Jeff Vander Stoep
e9777e3402 Move python sepolicy tests to embedded launcher
This is a necessary for enforcing these tests in CTS.

Bug: 37008075
Test: build
Change-Id: I36b4ce71c26a0ba01cd0289fe363f0a9f7db1214
(cherry picked from commit 8d614b3f81)
2017-10-04 17:09:30 +00:00
Nick Kralevich
2b13b74ade Remove duplicate allow rule.
am: c5e32208a2

Change-Id: Ib68f9090aebbb6bbe96d158f71ee862f2379c16b
2017-10-04 00:44:50 +00:00
Tri Vo
fd7da7b2a7 Move update_engine rules out of update_engine_common.te
Grant update_engine access to sysfs.
Ran fake ota go/manual-ab-ota, and this denial was fixed:
avc: denied { read } for pid=912 comm="update_engine" name="compatible"
dev="sysfs" ino=17399 scontext=u:r:update_engine:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

Test: boots with no new denials
Change-Id: I8697da3af254aea1cec44d9dbb1eca18be31859c
2017-10-03 16:46:29 -07:00
Nick Kralevich
c5e32208a2 Remove duplicate allow rule.
Duplicate of "allow domain su:fd use;"

Test: policy compiles.
Change-Id: I81d86a8b325d619d3ecc9450a011d6646605cab9
2017-10-03 15:48:02 -07:00
Tri Vo
91f07c63bb Merge "Give uncrypt access to /proc/cmdline."
am: daf0c6c187

Change-Id: I72cdcf1d5cfa24046b8e8a7da5aefbd36aadc8c4
2017-10-03 17:25:16 +00:00
Tri Vo
daf0c6c187 Merge "Give uncrypt access to /proc/cmdline." 2017-10-03 17:21:07 +00:00
Tri Vo
102f9df05b Merge "Remove surfaceflinger access to sysfs."
am: 9fdb30fcbb

Change-Id: I789ce45025b74f8460d76b6916fbc5c67dbabb0a
2017-10-03 16:22:12 +00:00
Tri Vo
9fdb30fcbb Merge "Remove surfaceflinger access to sysfs." 2017-10-03 16:09:00 +00:00
Etan Cohen
b6addc7160 Merge "[RTT2] policy change for Wi-Fi RTT (v2) framework"
am: a7c967e327

Change-Id: I9e7de6885f824229d52fa969bcff3667e991fd0e
2017-10-03 13:47:02 +00:00
Etan Cohen
a7c967e327 Merge "[RTT2] policy change for Wi-Fi RTT (v2) framework" 2017-10-03 13:41:55 +00:00
Daniel Cashman
c1bd5c6b5c Merge "Revert "Include 26.0 compat file on system image.""
am: 00cac07f11

Change-Id: I122c78682d437ca58cca3d4e9bf09be615320a85
2017-10-03 02:12:42 +00:00
Treehugger Robot
00cac07f11 Merge "Revert "Include 26.0 compat file on system image."" 2017-10-03 02:01:40 +00:00
Daniel Cashman
41ce23481c Revert "Include 26.0 compat file on system image."
This reverts commit f9cd76b1d8.

Change-Id: I4f753f3159b422fbca94be78e620bee2c39de38a
2017-10-03 00:07:11 +00:00
Dan Cashman
4baa588def Merge "Include 26.0 compat file on system image."
am: fab96b9a37

Change-Id: I3f9f20d977681d316ff14473afc58abe6b1ddf47
2017-10-02 23:16:59 +00:00
Treehugger Robot
fab96b9a37 Merge "Include 26.0 compat file on system image." 2017-10-02 22:54:13 +00:00
Tri Vo
9fa8ad6eb8 Give uncrypt access to /proc/cmdline.
Removes uncrypt access to the rest of /proc.
Fixes this denial, which can be triggered from recovery_component_test:
[  142.540819] type=1400 audit(1506983074.139:23): avc: denied { read }
for pid=5767 comm=uncrypt name=cmdline dev=proc ino=4026532114
scontext=u:r:uncrypt:s0 tcontext=u:object_r:proc_cmdline:s0 tclass=file
permissive=0

Bug: 66497047
Test: recovery_component_test --gtest_filter=UncryptTest.*
no more denials to /proc/cmdline
Change-Id: If1a7630779d667d52a0cc44114ef6177982de21c
2017-10-02 15:31:48 -07:00
Tri Vo
d1d11e3877 Merge "Restrict lmkd read access from sysfs_type to sysfs_lowmemorykiller."
am: f58d179569

Change-Id: I88975468628920fe990424afb3508bd074f71408
2017-10-02 21:23:43 +00:00
Dan Cashman
f9cd76b1d8 Include 26.0 compat file on system image.
This file is necessary for using an mr1 system image in conjunction
with an oc-dev vendor image.  This is currently needed by GSI testing,
for example.

(cherry-pick of commit: 03596f28a4)

Bug: 66358348
Test: File is included on system image.
Change-Id: I3a6b7ed5edf1c07941bbf835e70f2ae8d03fee25
2017-10-02 14:21:57 -07:00
Tri Vo
54a2cac5a2 Remove surfaceflinger access to sysfs.
Bug: 65643247
Test: SurfaceFlinger_test passes (except known failures) without selinux
denials
Change-Id: I6ce185f92e5ad64a172da7d7e12167d8da2ebed0
2017-10-02 14:17:14 -07:00
Treehugger Robot
f58d179569 Merge "Restrict lmkd read access from sysfs_type to sysfs_lowmemorykiller." 2017-10-02 21:11:32 +00:00
Etan Cohen
4680cd9690 [RTT2] policy change for Wi-Fi RTT (v2) framework
A parallel Wi-Fi RTT service is being added in parallel. Switch-over
will occur once the new service is ready.

Bug: 65014552
Test: integration tests
Change-Id: Ie4b15592140462af70c7092511aee3f603aaa411
2017-09-29 09:42:42 -07:00
Bowgo Tsai
864b9af9a9 Merge "Removing $(PRODUCT_OUT)/root/root"
am: 2f6e66ff09

Change-Id: I07deaf9045d9d7038e36e2b674130ad2a6469002
2017-09-29 03:32:37 +00:00
Jin Qian
b287decf75 Merge "Allow dumpstate to run iotop"
am: 9e61f56d5c

Change-Id: Ia0c640063aacfd77419c0f4752e8c605b96124ca
2017-09-29 03:27:44 +00:00
Treehugger Robot
2f6e66ff09 Merge "Removing $(PRODUCT_OUT)/root/root" 2017-09-29 02:33:44 +00:00
Treehugger Robot
9e61f56d5c Merge "Allow dumpstate to run iotop" 2017-09-28 21:11:28 +00:00
William Roberts
65c3654b59 Merge changes from topic "locale-fix"
am: 5bb3c603f1

Change-Id: I7b2f66d4f8dc0416c7565f719c45329d321e7303
2017-09-28 20:41:31 +00:00
Treehugger Robot
5bb3c603f1 Merge changes from topic "locale-fix"
* changes:
  nonplat_property_contexts: use fc_sort vs sort
  plat_property_contexts: use fc_sort vs sort
2017-09-28 20:29:43 +00:00
Jin Qian
148674ab16 Allow dumpstate to run iotop
Test: adb bugreport
Bug: 63629306
Change-Id: I7a366b199ddd0ec303dc25ca8c35764c5d7e3af8
2017-09-28 10:30:22 -07:00
Bowgo Tsai
4cc4096a5c Removing $(PRODUCT_OUT)/root/root
Bug: 65570851
Test: boot sailfish
Change-Id: I008bf5386595c614236de44131afcda7d3fd6d98
Merged-In: I008bf5386595c614236de44131afcda7d3fd6d98
(cherry picked from commit 82ca9c2ef4)
2017-09-28 18:12:13 +08:00
Dan Cashman
ed144eba63 Fix build.
am: 7d1130f111  -s ours

Change-Id: I37cd37e3e4215fecb3aeb1957507f52b3d3e5448
2017-09-28 00:03:30 +00:00
Dan Cashman
7d1130f111 Fix build.
(This reverts internal commit: 82ca9c2ef4)
Test: None.

Merged-in: I97ffdd48b64ef5c35267387079204512a093a356
Change-Id: I97ffdd48b64ef5c35267387079204512a093a356
2017-09-27 16:37:54 -07:00
Jeff Vander Stoep
58983a3ef4 Allow system settings to read /proc/version
am: c975bd904f

Change-Id: I576189108f7863076070734b958385d1cd545c5b
2017-09-27 21:34:47 +00:00
Jeff Vander Stoep
c975bd904f Allow system settings to read /proc/version
Used to display kernel version in settings app.

avc: denied { read } for name="version" dev="proc"
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_version:s0
tclass=file permissive=0

Bug: 66985744
Test: kernel version now displayed in settings app.
Change-Id: I53f92f63362b900347fd393a40d70ccf5d220d30
2017-09-27 19:38:23 +00:00
Dan Cashman
852aca050d Fix build.
(This reverts internal commit: 82ca9c2ef4)
Test: None.

Change-Id: I97ffdd48b64ef5c35267387079204512a093a356
2017-09-27 12:32:33 -07:00
William Roberts
3949fe234a nonplat_property_contexts: use fc_sort vs sort
sort respects locale settings, so the value of LC_ALL can affect
how sort orders things. This can cause labeling issues.

More information on locale and sort can be found via:
  * locale(1) - man 1 locale
  * sort(1) - man 1 sort
  * https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28539

Rather than deal with this locale setting use fc_sort on
property contexts. This also has the side-effect of
stripping comments, and thus sed can be dropped.

Test: This was tested by:
  * comparing outputs to previous runs
  * compile tested *only*.

Change-Id: I1e1eb4dff76f717b5f82f697e677a108abb69892
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2017-09-27 12:03:46 -07:00
William Roberts
4b44d24961 plat_property_contexts: use fc_sort vs sort
sort respects locale settings, so the value of LC_ALL can affect
how sort orders things. Issues have surfaced when CTS build
servers locale differs from image build server locale. And thus
the prologue of property_contexts differs with what CTS was
expecting.

More information on locale and sort can be found via:
  * locale(1) - man 1 locale
  * sort(1) - man 1 sort
  * https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28539

Rather than deal with this locale setting use fc_sort on
property contexts. This also has the side-effect of
stripping comments, and thus sed can be dropped.

Test: This was tested by:
  * comparing outputs to previous runs
  * booting the x86-64 emulator

Change-Id: I144ef549cc11d9c61849ffc0e1b1b000f1b8d1a8
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2017-09-27 12:03:46 -07:00
Dan Cashman
3e21c5f157 Fix build. Split mediaprovider from priv_app.
This CL was accidentally reverted a second time by commit:
cb5129f9de.  Submit it for the third,
and final, time.

(cherry-pick of 5637587d37
which was in AOSP and internal master but not stage-aosp-master)

Bug: 62102757
Test: Builds and boots.
Change-Id: I0394907e808c737422e644aec452baa3e777cf6f
2017-09-27 12:00:30 -07:00
Dan Cashman
2aa045f1ff resolve merge conflicts of 91d398d8 to stage-aosp-master
Also add missing commit: ca595e1163

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2a210c3b58565a40117bf3d061e9bf904ed687c2
2017-09-27 09:50:24 -07:00
Dan Cashman
91d398d802 Sync internal master and AOSP sepolicy.
Bug: 37916906
Test: Builds 'n' boots.
Change-Id: Ia1d86264446ebecc1ca79f32f11354921bc77668
Merged-In: I208ec6a864127a059fb389417a9c6b259d7474cb
2017-09-26 14:38:47 -07:00