- Nov 30, 2018
-
-
Dan Austin authored
This includes the SELinux policy changes to allow for kcov access in userdebug builds for coverage-guided kernel fuzzing. Bug: 117990869 Test: Ran syzkaller with Android untrusted_app sandbox with coverage. Change-Id: I1fcaad447c7cdc2a3360383b5dcd76e8a0f93f09
-
- Nov 29, 2018
-
-
Tri Vo authored
-
Treehugger Robot authored
-
felkachang authored
The isolated service that do nothing for AIDL's APIs still got the SELinux denied. This should fix presubmit test. 01-01 00:00:22.103 5831 5831 I auditd : type=1400 audit(0.0:6): avc: denied { getattr } for comm="convert.service" path="/data/data/com.android.providers.media" dev="sda35" ino=1442136 scontext=u:r:isolated_app:s0:c0,c256,c512,c768 tcontext=u:object_r:privapp_data_file:s0:c512,c768 tclass=dir permissive=0 Test: build Bug: 119596573 Change-Id: Ie58326ba217ed6ca56ca9933c6664896ac3d327a
-
Tri Vo authored
According to go/sedenials (internal dogfooding), coredomain access to following types is not exercised and can be removed: iio_device radio_device tee_device Access to audio_device is still needed since some ALSA interfaces (/dev/snd/*) are directly used by system_server. Bug: 110962171 Test: m selinux_policy Change-Id: I740b99813e1f93136bfcaec087b74f0e03b259ad
-
Nick Kralevich authored
-
Treehugger Robot authored
-
Nick Kralevich authored
Move rules / neverallow assertions from public to private policy. This change, by itself, is a no-op, but will make future patches easier to read. The only downside of this change is that it will make git blame less effective. Motivation: When rules are placed into the public directory, they cannot reference a private type. A future change will modify these rules to reference a private type. Test: compiles Bug: 112357170 Change-Id: I56003409b3a23370ddab31ec01d69ff45c80d7e5
-
liwugang authored
OOB write if the size of the key value pairs exceeds the max. Test: Add a long line to the seapp_contexts file Change-Id: Iaa3e697e7ac134eb6829b8b36b090997ca344b3a Signed-off-by:
liwugang <liwugang@xiaomi.com>
-
- Nov 28, 2018
-
-
Florian Mayer authored
Bug: 117762471 Test: m Test: flash sailfish Test: profile all running processes with setenforce 1 Change-Id: I71d41d06d2a62190e33b7e3e425a1f7b8039196e
-
Yifan Hong authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Yifan Hong authored
Test: bugreport Bug: 119809588 Change-Id: Ia688d68120daebc0a4feb51c4745535e1b371594
-
Hongyi Zhang authored
-
- Nov 27, 2018
-
-
Yiwei Zhang authored
Also allow adb shell dumpsys gpu to not return error. Bug: 120095213 Test: flash non-eng build and adb shell cmd gpu vkjson Change-Id: Ia4a50a475ce76ec35e082dd52d4a6c80dde7f571
-
Branden Archer authored
NIAP certification requires that all cryptographic functions undergo a self-test during startup to demonstrate correct operation. init now performs this check during startup. The self-test is forked from init. For the child process to be able to request a reboot it needs permissions to set the sys.powerctl property. Bug: 119826244 Test: Built for walleye. When the BoringSSL self test was forced to fail the device rebooted into the bootloader, as expected. Change-Id: I4171b1dd0a5e393252ae5c002171ac51c9cbb3e6
-
Nick Kralevich authored
The SELinux policy language supports an expandattribute statement. Similar to the C "inline" declaration, this expands the permissions associated with types, instead of using the attribute directly. Please see https://android.googlesource.com/platform/external/selinux/+/1089665e31a647a5f0ba2eabe8ac6232b384bed9 for more detail on this language option. Expansion of attributes causes consistency problems with CTS. If a neverallow rule exists which refers to an expanded attribute, the CTS neverallow test will fail, because the policy does not have the attribute embedded in it. Examples: * b/119783042 (fixed in 536d3413) * b/67296580 (fixed in 6f7e8609) * b/63809360 (fixed in 89f215e6) etc... Instead of waiting for the CTS test to fail, modify the Android.mk file so that we do checks similar to CTS. This allows us to fail at compile time instead of waiting for a CTS bug. For example, for b/119783042, instead of the compile succeeding, it will now fail with the following error message: [ 70% 190/268] build out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows FAILED: out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows /bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/policy.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp neverallow -w -f out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/policy_2.conf || ( echo \"\" 1>&2; echo \"sepolicy-analyze failed. This is most likely due to the use\" 1>&2; echo \"of an expanded attribute in a neverallow assertion. Please fix\" 1>&2; echo \"the policy.\" 1>&2; exit 1 ) ) && (touch out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp ) && (mv out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/crosshatch/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows )" libsepol.report_failure: neverallow violated by allow vold hal_bootctl_default:binder { call }; libsepol.check_assertions: 1 neverallow failures occurred sepolicy-analyze failed. This is most likely due to the use of an expanded attribute in a neverallow assertion. Please fix the policy. 15:44:27 ninja failed with: exit status 1 Test: Revert 536d3413 and verify compile fails as above. Test: Compile succeeds Bug: 119783042 Change-Id: I5df405b337bb744b838dadf53a2234d8ed94bf39
-
Hongyi Zhang authored
server_configurable_flags_data_file is used for storing server configurable flags which have been reset during current booting. system_server needs to read the data to perform related disaster recovery actions. For how the data is read, see SettingsToPropertiesMapper.java. Test: build succeeds & manual on device Change-Id: Ifa22aecc13af2c574579299d28433622abbe6b85
-
Daniel Rosenberg authored
remount is needed for commiting checkpoints under f2fs Test: vdc checkpoint commitChanges Bug: 111020314 Change-Id: If7d4ab641b59d3e942d9d8a72bd91be08680227b
-
Mikhail Naganov authored
-
Nick Kralevich authored
-
Nick Kralevich authored
Hals have 3 attributes associated with them, the attribute itself, the _client attribute, and the _server attribute. Only the server attribute isn't expanded using the expandattribute keyword, and as a result, is the only attribute which can be used in neverallow rules. Fix neverallow rule to use hal_bootctl_server, which is not expanded, instead of hal_bootctl. Introduced in: https://android-review.googlesource.com/c/platform/system/sepolicy/+/777178 Test: policy compiles Bug: 119500144 Change-Id: I8cff9cc03f4c30704175afb203c68f237fbd61ca
-
- Nov 26, 2018
-
-
Nick Kralevich authored
During the build process, use a temporary file until we've determined that every step of the build process has completed. Failure to do this may cause subsequent invocations of the make command to improperly assume that this step ran to completion when it didn't. Test: code compiles. Change-Id: I9a28e653e33b61446a87278975789376769bcc6a
-
- Nov 24, 2018
-
-
Treehugger Robot authored
-
Dario Freni authored
There is no real need to access the manifest.json (which is being renamed in other CLs anyway). So remove the access to it. Bug: 119672727 Test: m, installed on device, boots. Change-Id: I2d82062031da36f871b2a64d97a50a6f1e6fc3dd
-
- Nov 23, 2018
-
-
Treehugger Robot authored
-
- Nov 22, 2018
-
-
Neda Topoljanac authored
We introduced a new API to allow Device Owner to install an OTA file on disk. This in turn requires system_server to be able to copy the OTA file to a known OTA file location, call into update_engine to start the installation and let update_engine to call back to the system_server to deliver any error conditions asynchronously. This CL modifies the SELinux policy to allow these interaction. Test: manual in TestDPC, CTS tests for negative cases: atest com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate Change-Id: Id1fbea9111f753c5c80f270c269ecb9ef141cd79 Bug: 111173669
-
Treehugger Robot authored
-
Yifan Hong authored
In recovery, everything is labeled rootfs, including /system/bin/*. Allow postinstall to execute them in recovery. Test: sideload Bug: 116608795 Fixes: 119877813 Change-Id: I5682bdecd0df1cb9ff3bc968ea29449b0b8588f4
-
- Nov 21, 2018
-
-
Nick Kralevich authored
Commit ebc3a1a3 ("Move to ioctl whitelisting for plain files / directories", Oct 10th), enabled ioctl filtering on all files, including functionfs files. However, recovery performs the ioctl FUNCTIONFS_ENDPOINT_DESC on functionfs files, so allow it. Addresses the following denial: audit: type=1400 audit(673009.476:507811): avc: denied { ioctl } for pid=731 comm="recovery" path="/dev/usb-ffs/adb/ep1" dev="functionfs" ino=473 ioctlcmd=0x6782 scontext=u:r:recovery:s0 tcontext=u:object_r:functionfs:s0 tclass=file permissive=1 Test: policy compiles. Bug: 119877813 Change-Id: I09715acc16ab319b8d8b1f233cefaec23a358962
-
Treehugger Robot authored
-
chenbruce authored
Gathering file contexts for all APEXes there for easier auditing. Test: m com.android.resolv Bug: 119527674 Change-Id: I0f06c21c77f4b537e7c7d590204569f4531b5302
-
Nick Kralevich authored
Used at: https://android.googlesource.com/platform/frameworks/base/+/7271c452a945a629c39fe885058c14c4ad11204e/services/core/jni/com_android_server_PersistentDataBlockService.cpp#60 Addresses the following denials: audit(0.0:413): avc: denied { ioctl } for comm="Binder:1365_1C" path="/dev/block/sdg1" dev="tmpfs" ino=20555 ioctlcmd=127d scontext=u:r:system_server:s0 tcontext=u:object_r:frp_block_device:s0 tclass=blk_file permissive=0 audit(0.0:410): avc: denied { ioctl } for comm="Binder:1365_3" path="/dev/block/sdg1" dev="tmpfs" ino=20555 ioctlcmd=1277 scontext=u:r:system_server:s0 tcontext=u:object_r:frp_block_device:s0 tclass=blk_file permissive=0 Test: policy compiles. Change-Id: I7614b6269031b7912a7b93dc5307f5687458fba8
-
- Nov 20, 2018
-
-
Hongyi Zhang authored
-
Treehugger Robot authored
-
Hongyi Zhang authored
grant rw_dir_perms of dir /data/server_configurable_flags to flags_health_check.te, in order to enable flags_health_check to record reset flags data as file under this dir for later use. See function: server_configurable_flags::ServerConfigurableFlagsReset for how the permission is used. Test: manual on device Change-Id: I1df7b8cadfbe279f26bf828e9e725ce170a376f7
-
Nick Kralevich authored
By convention, auditallow statements are always placed in userdebug_or_eng() blocks. This ensures that we don't inadvertently ship audit rules on production devices, which could result in device logspam, and in pathological situations, impact device performance (generating audit messages is much more expensive than a standard SELinux check). Bug: 117606664 Test: policy compiles. Change-Id: I681ed73c83683e8fdbef9cf662488115f6e7a490
-
Nick Kralevich authored
Commit b4f17069 ("sepolicy: Drop BOARD_SEPOLICY_IGNORE/REPLACE support.", Mar 2015) made it a compile time failure to use BOARD_SEPOLICY_REPLACE or BOARD_SEPOLICY_IGNORE. As these restrictions have been in place since 2015, we can safely assume all usages of this have been cleaned up, and there is no further need to check for this. 8 lines deleted from Android.mk, 1720 lines to go. Test: compiles. Change-Id: I23249e4b2e9ec83cb6356a6c5a6e187ae1fc9744
-
Nicolas Geoffray authored
-