Commit graph

3047 commits

Author SHA1 Message Date
Calin Juravle
91989fcea5 Merge "Allow system server to write profile snapshots in /data/misc/profman" into pi-dev
am: dfaf39154f

Change-Id: I6f12c21a6c1cfda7d4a3b556e7f6066d0c2782c0
2018-05-09 14:49:25 -07:00
Calin Juravle
dfaf39154f Merge "Allow system server to write profile snapshots in /data/misc/profman" into pi-dev 2018-05-09 21:35:08 +00:00
Calin Juravle
687d5e46ce Allow system server to write profile snapshots in /data/misc/profman
The goal is to allow creating profile snapshots from the shell command in
order to be able to write CTS tests.

The system server will dump profiles for debuggable in /data/misc/profman
from where they will be pulled and verified by CTS tests.

Test: adb shell cmd package snapshot-profile com.android.vending
Bug: 74081010
Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
2018-05-09 11:41:39 -07:00
Mark Salyzyn
afb0ca6132 Merge "init: support /dev/input" am: 2a3f55b5e0
am: 263d71b0ce

Change-Id: I54b95186892fcb380412c16e758a061de36eb430
2018-05-09 10:58:19 -07:00
Mark Salyzyn
2a3f55b5e0 Merge "init: support /dev/input" 2018-05-09 16:49:56 +00:00
Dongwon Kang
f261c7f5e7 Merge "Allow sdcardfs:file read access on mediaextractor" 2018-05-09 00:08:17 +00:00
android-build-team Robot
07851d2ff4 Merge "Allow sdcardfs:file read access on mediaextractor" into pi-dev
am: 351b9a3796

Change-Id: I08b9ffb9e7b859deb22e7242edfecc73c2dc7af8
2018-05-08 15:36:44 -07:00
android-build-team Robot
351b9a3796 Merge "Allow sdcardfs:file read access on mediaextractor" into pi-dev 2018-05-08 22:25:41 +00:00
android-build-team Robot
b58e715b44 Merge "Whitelist reading property ro.aac_drc_effect_type" into pi-dev
am: adf00fa82e

Change-Id: I212016bcd828b363c4af041e02a365e636d902a8
2018-05-07 15:15:37 -07:00
Jean-Michel Trivi
41795cdf6d Whitelist reading property ro.aac_drc_effect_type
Bug: 71430241
Test: build/flash, grep for "avc: denied { read }" for mediacodec, should be empty on walleye
Change-Id: I12e1b11a969d3f979ca0cfbe4ca7db2bc5e46165
2018-05-07 12:28:17 -07:00
Mark Salyzyn
5e6b6bc421 init: support /dev/input
Test: compile
Bug: 64114943
Change-Id: I2bbf84a6e472d720f02282e10d56795b75ac62d1
2018-05-07 14:28:24 +00:00
Jeff Vander Stoep
1279a7ae85 resolve merge conflicts of bc34fa26ac to pi-dev-plus-aosp
Bug: None
Test: None
Change-Id: Ie9d2f35efd5bf39d0282ccc41fdd3f974d7c01bf
2018-05-04 19:03:03 -07:00
Josh Gao
d018b5ce2c Merge changes from topic "tombstoned_empty" into pi-dev
* changes:
  Update sepolicy prebuilts for tombstoned.
  tombstoned: allow linking tombstones.
2018-05-04 21:37:22 +00:00
Pavel Maltsev
43e172af66 Move automotive HALs sepolicy to system/
Bug: 70637118
Test: build, flash and boot automotive builds

Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
Merged-In: I6db23258de30174d6db09d241e91b08aa5afedef
(cherry picked from commit 394dbe34a0)
2018-05-04 21:36:48 +00:00
Pawin Vongmasa
19a74ec88a Put in sepolicies for Codec2.0 services
Test: Builds

Bug: 64121714
Bug: 31973802
Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
(cherry picked from commit 4be2889477)
2018-05-04 21:36:41 +00:00
Jeff Vander Stoep
7a4af30b38 Start the process of locking down proc/net
Files in /proc/net leak information. This change is the first step in
determining which files apps may use, whitelisting benign access, and
otherwise removing access while providing safe alternative APIs.

To that end, this change:
* Introduces the proc_net_type attribute which will assigned to any
new SELinux types in /proc/net to avoid removing access to privileged
processes. These processes may be evaluated later, but are lower
priority than apps.
* Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing
use by VPN apps. This may be replaced by an alternative API.
* Audits all other proc/net access for apps.
* Audits proc/net access for other processes which are currently
granted broad read access to /proc/net but should not be including
storaged, zygote, clatd, logd, preopt2cachename and vold.

Bug: 9496886
Bug: 68016944
Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube
    navigate maps, send text message, make voice call, make video call.
    Verify no avc "granted" messages in the logs.
Test: A few VPN apps including "VPN Monster", "Turbo VPN", and
"Freighter". Verify no logspam with the current setup.
Test: atest CtsNativeNetTestCases
Test: atest netd_integration_test
Test: atest QtaguidPermissionTest
Test: atest FileSystemPermissionTest

Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457
Merged-In: I7e49f796a25cf68bc698c6c9206e24af3ae11457
(cherry picked from commit 087318957f)
2018-05-04 21:36:33 +00:00
Roshan Pius
d7b34a48ff sepolicy(hostapd): Add a HIDL interface for hostapd
* Note on cherry-pick: Some of the dependent changes are not in AOSP.
In order to keep hostapd running correctly in AOSP, I've modified this
change to only include policy additions.

Change sepolicy permissions to now classify hostapd as a HAL exposing
HIDL interface.

Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd:
12-27 23:40:55.913  4952  4952 W hostapd : type=1400 audit(0.0:19): avc:
denied { write } for name="hostapd" dev="sda13" ino=4587601
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0

01-02 19:07:16.938  5791  5791 W hostapd : type=1400 audit(0.0:31): avc:
denied { search } for name="net" dev="sysfs" ino=30521
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0

Bug: 36646171
Test: Device boots up and able to turn on SoftAp.
Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947
Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947
(cherry picked from commit 5bca3e860d)
2018-05-04 21:36:24 +00:00
android-build-prod (mdb)
64d56f81f8 Merge "FrameworksServicesTests: allow access to test.sys.boot.reason property" am: 8c139df845
am: 8f0e92bbfa

Change-Id: I5fc7d670c79d5415e5fdce3e17c033ea8a437bbd
2018-05-04 14:30:39 -07:00
android-build-prod (mdb)
8c139df845 Merge "FrameworksServicesTests: allow access to test.sys.boot.reason property" 2018-05-04 21:19:46 +00:00
Jeffrey Vander Stoep
54f61fe53c Merge "Never expand proc_type attribute" 2018-05-04 20:10:28 +00:00
Jeffrey Vander Stoep
b8d870c18b Merge "Revert "FrameworksServicesTests: allow access to test.sys.boot.reason property"" am: bba94f80bb
am: cbae15fd69

Change-Id: I5941463f4252da1c6b77e685b5b4bdd13c53dc1b
2018-05-04 07:35:55 -07:00
Mark Salyzyn
3443cafa98 FrameworksServicesTests: allow access to test.sys.boot.reason property
com.android.server.power.PowerManagerServiceTest#testGetLastShutdownReasonInternal due to "RuntimeException: failed to set system property"

W/roidJUnitRunner: type=1400 audit(0.0:6): avc: denied { write } for name="property_service" dev="tmpfs" ino=13178 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
W/libc    : Unable to set property "test.sys.boot.reason" to "shutdown,thermal": connection failed; errno=13 (Permission denied)

Had to use precise property definition as com.android.phone accesses
test properties as well.

Test: compile
Bug: 78245377
Change-Id: I2cc810846f8615f2a2fae8e0d4f41de585b7abd7
2018-05-04 07:33:56 -07:00
Jeffrey Vander Stoep
bba94f80bb Merge "Revert "FrameworksServicesTests: allow access to test.sys.boot.reason property"" 2018-05-04 14:25:31 +00:00
Jeff Vander Stoep
a6295412b4 Never expand proc_type attribute
It's used in build-time tests and in CTS.

Bug: 78898770
Test: build user-build
Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
Merged-In: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
2018-05-04 06:44:58 +00:00
Jeffrey Vander Stoep
9c6749d772 Revert "FrameworksServicesTests: allow access to test.sys.boot.reason property"
This reverts commit 0ab13a8dff.

Reason for revert: broken presubmit tests
https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=83e847b2-8e30-4417-9b15-8e66af4b2bc3&target=DeviceBootTest

Change-Id: Id173c8e7fa28ba04070f507098f301f076e4aae7
2018-05-04 06:23:42 +00:00
android-build-prod (mdb)
76f59094b9 Merge "FrameworksServicesTests: allow access to test.sys.boot.reason property" am: 0e055173b1
am: 40f6019c7b

Change-Id: I0792ae4deffa2532315673d824502fc8c03e3651
2018-05-03 16:38:34 -07:00
android-build-prod (mdb)
0e055173b1 Merge "FrameworksServicesTests: allow access to test.sys.boot.reason property" 2018-05-03 23:21:58 +00:00
Tri Vo
bfe1e42143 Merge "SELinux type for vendor public libs." am: 59e9d2d8c9
am: 9d99ee2316

Change-Id: I50978971a2cf6221024d91edde0cb85b9415f7be
2018-05-03 13:11:21 -07:00
Tri Vo
59e9d2d8c9 Merge "SELinux type for vendor public libs." 2018-05-03 19:52:58 +00:00
Pavel Maltsev
25444a2252 Merge "Allow auto HAL clients to access hw services" into pi-dev
am: 53c6578ff2

Change-Id: Iae7cf1baecc889cbb2c621be279cd9b40ffa852b
2018-05-03 10:13:52 -07:00
Pavel Maltsev
53c6578ff2 Merge "Allow auto HAL clients to access hw services" into pi-dev 2018-05-03 16:58:58 +00:00
Mark Salyzyn
0ab13a8dff FrameworksServicesTests: allow access to test.sys.boot.reason property
com.android.server.power.PowerManagerServiceTest#testGetLastShutdownReasonInternal due to "RuntimeException: failed to set system property"

W/roidJUnitRunner: type=1400 audit(0.0:6): avc: denied { write } for name="property_service" dev="tmpfs" ino=13178 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
W/libc    : Unable to set property "test.sys.boot.reason" to "shutdown,thermal": connection failed; errno=13 (Permission denied)

Test: compile
Bug: 78245377
Change-Id: Id21436d281bab27823969a9f7e92318d70b5a2d6
2018-05-03 16:45:36 +00:00
android-build-team Robot
4a4411782a Merge "Never expand proc_type attribute" into pi-dev
am: d8d7a3f7cc

Change-Id: Ibd8dc38bf69f85a9ef05ee1eee668a11c6262657
2018-05-03 07:47:03 -07:00
android-build-team Robot
d8d7a3f7cc Merge "Never expand proc_type attribute" into pi-dev 2018-05-03 14:29:48 +00:00
Jeff Vander Stoep
db6218417c Never expand proc_type attribute
It's used in build-time tests and in CTS.

Bug: 78898770
Test: build user-build
Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
(cherry picked from commit beeb122405070a5b4cee326a0cdae92a1a791fbc)
2018-05-02 15:00:55 -07:00
android-build-prod (mdb)
fd0ac5d6ac Merge "tombstoned: allow linking tombstones." am: c4ec97ab1f
am: aadd0e99a6

Change-Id: Ic2318d08722a078eb78692a3f3d404b1b460cd99
2018-05-02 14:56:46 -07:00
Tri Vo
29497b623e SELinux type for vendor public libs.
Vendor public libs are exposed to apps (not system), and their ABI
stability is guaranteed by vendor. Introducing new selinux type so that
we don't conflate concepts of same-process HAL and vendor public lib.
The former is exposed to all domains, while the latter should only be
acessible by apps.

Bug: 76413554
Test: build-only change, policy builds
Change-Id: I89dad351374f46c7fe2726991eb4c05064c37ed5
2018-05-02 14:51:05 -07:00
Josh Gao
5159b1c9d6 tombstoned: allow linking tombstones.
Bug: http://b/77729983
Test: debuggerd_test
Test: adb shell 'for x in `seq 0 50`; do crasher; done'
Change-Id: I1d86d04047240a85b2e987116efd9be59607b766
(cherry picked from commit a7bf5810da)
2018-05-02 14:44:18 -07:00
android-build-prod (mdb)
c4ec97ab1f Merge "tombstoned: allow linking tombstones." 2018-05-02 21:43:03 +00:00
Andrew Sapperstein
2ed7ba3d44 Merge "Add ro.oem.key1 to SELinux policy." into pi-dev
am: b12ca61e9c

Change-Id: Ib7b77f1e82e5d653a9cf54d7f52a284f6491be72
2018-05-02 14:24:53 -07:00
Andrew Sapperstein
b12ca61e9c Merge "Add ro.oem.key1 to SELinux policy." into pi-dev 2018-05-02 21:10:41 +00:00
android-build-team Robot
9d4573c448 Merge changes Ic3f85992,I33f47db7 into pi-dev
* changes:
  Sepolicy: Modify postinstall_dexopt
  Sepolicy: Modify postinstall_dexopt
2018-05-02 18:52:02 +00:00
Andrew Sapperstein
99bfd8efdf Add ro.oem.key1 to SELinux policy.
vendor-init-settable|public-readable

Change-Id: I8262cc03150931080c0982350cd990ee8f5422bc
Fixes: 78636965
Test: adb shell getprop ro.oem.key1
2018-05-02 11:48:30 -07:00
Tri Vo
7db0bddbd1 Merge "init: restrict setattr perms to /proc." am: 4bb33bc38f
am: 12a0f7b922

Change-Id: Ifea0a56a82106e88159b319ec2317566a9d088e5
2018-05-02 11:31:29 -07:00
Tri Vo
4bb33bc38f Merge "init: restrict setattr perms to /proc." 2018-05-02 18:18:49 +00:00
Pavel Maltsev
368ae61fc7 Allow auto HAL clients to access hw services
Bug: 70637118
Test: m && emulator ; also verified on bat_land
Change-Id: I39dd17d20acc8d380f36e207679b8b1eba63a72e
2018-05-02 09:54:40 -07:00
android-build-prod (mdb)
5afce15046 Merge "Audit generic debugfs access for removal" am: 65352c904a
am: 810ad5f27b

Change-Id: I8e5cf7eaf9eb290090adfb5c2821a7efdd9e1acf
2018-05-01 23:11:36 -07:00
android-build-prod (mdb)
65352c904a Merge "Audit generic debugfs access for removal" 2018-05-02 06:00:04 +00:00
android-build-prod (mdb)
73d7cabfb9 Merge "Only installd and init may relabel app_data_file." am: 577b7a5d7b
am: 8f867acb4a

Change-Id: I3071aeb263d81cd27d8a8ba8897d6ca1e4193887
2018-05-01 16:45:14 -07:00
android-build-prod (mdb)
577b7a5d7b Merge "Only installd and init may relabel app_data_file." 2018-05-01 23:35:16 +00:00