Skip to content
Snippets Groups Projects
  1. Dec 04, 2018
  2. Dec 03, 2018
    • felkachang's avatar
      Track isolated_app app_data_file SELinux denial. · 22f86690
      felkachang authored
      The isolated service that do nothing except for both AIDL's basic
      skeleton and service binding. It still got the SELinux denied.
      This should fix presubmit test.
      
      01-01 00:00:29.196  6121  6121 I auditd  : type=1400 audit(0.0:6):
      avc: denied { getattr } for comm="convert.service"
      path="/data/data/com.android.externalstorage" dev="sda35" ino=655437
      scontext=u:r:isolated_app:s0:c0,c256,c512,c768
      tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
      
      Test: ag/5681059 ag/5660144
      Bug: 120394782
      Change-Id: I7838def96da30b88d510dab860ed9779a0d4d5ed
      22f86690
    • Primiano Tucci's avatar
    • Daniel Mentz's avatar
      Allow hal_usb to call getsockopt on uevent socket · bbdb25f6
      Daniel Mentz authored
      We are making a change to uevent_open_socket() in libcutils related to
      setting the receive buffer size of netlink uevent sockets.
      
      After setting SO_RCVBUF, we immediately read it back using getsockopt()
      to verify that the setsockopt() call was effective. Only if it was not
      effective, we call setsockopt() with SO_RCVBUFFORCE.
      
      getsockopt() previously caused SELinux denials like the following:
      
       avc: denied { getopt } for comm="usb@1.1-service" scontext=u:r:hal_usb_default:s0 tcontext=u:r:hal_usb_default:s0 tclass=netlink_kobject_uevent_socket permissive=0
      
      Bug: 119933843
      Change-Id: I7bbb1eb1fa7ade2c94afc52ab1e28762f86a7d1f
      bbdb25f6
    • Neil Fuller's avatar
      Track add of RuntimeService in system server · f58b555d
      Neil Fuller authored
      Adds the necessary incantations for the new service.
      
      Bug: 118242715
      Bug: 119026403
      Test: build / boot / adb shell dumpsys
      Change-Id: Ibb1a356067863316d70586a61ede9f5973c1ae15
      f58b555d
    • Primiano Tucci's avatar
      Allow traced_probes to access battery coulomb counters · 353b93a9
      Primiano Tucci authored
      Allows battery counters to be logged in the trace. This
      is to allow high fidelity attribution of battery power.
      
      Matching feature CL: aosp/838951
      
      SELinux denials that lead to this:
      avc: denied { read } for comm="traced_probes" name="u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=0
      avc: denied { read } for comm="traced_probes" name="u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=0 duplicate messages suppressed
      avc: denied { read } for comm="traced_probes" name="u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { read } for comm="traced_probes" name="u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { open } for comm="traced_probes" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { open } for comm="traced_probes" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { getattr } for comm="traced_probes" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { getattr } for comm="traced_probes" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev="tmpfs" ino=17794 scontext=u:r:traced_probes:s0 tcontext=u:object_r:hwservicemanager_prop:s0 tclass=file permissive=1
      avc: denied { call } for comm="traced_probes" scontext=u:r:traced_probes:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      avc: denied { call } for comm="traced_probes" scontext=u:r:traced_probes:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
      avc: denied { search } for comm="hwservicemanage" name="26854" dev="proc" ino=4959346 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=dir permissive=1
      avc: denied { search } for comm="hwservicemanage" name="26854" dev="proc" ino=4959346 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=dir permissive=1
      avc: denied { read } for comm="hwservicemanage" name="current" dev="proc" ino=4959383 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=file permissive=1
      avc: denied { read } for comm="hwservicemanage" name="current" dev="proc" ino=4959383 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=file permissive=1
      avc: denied { open } for comm="hwservicemanage" path="/proc/26854/attr/current" dev="proc" ino=4959383 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=file permissive=1
      avc: denied { open } for comm="hwservicemanage" path="/proc/26854/attr/current" dev="proc" ino=4959383 scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=file permissive=1
      avc: denied { getattr } for comm="hwservicemanage" scontext=u:r:hwservicemanager:s0 tcontext=u:r:traced_probes:s0 tclass=process permissive=1
      
      
      Bug: 113076327
      Change-Id: I4aabd0d70025105320c4a8d34470098807d56899
      353b93a9
    • Jiyong Park's avatar
      Allow apexd to label apk_tmp_file to apex_data_file · ce15e5e5
      Jiyong Park authored
      Currently, when an APEX is staged, apexd moves the file from
      /data/app/vmdl*.tmp directory to /data/apex. However, the original file
      is labeled with apk_tmp_file and is not readable from apexd.
      
      We plan to resolve this issue by moving the file content via file
      descriptor in between the package manager and apexd.
      
      However, until the plan is implemented, temporarily allow apexd to
      relabel the file to apex_data_file that is readable to it. This unblocks
      the end-to-end test for APEX.
      
      Bug: 112669193
      Test: adb install --apex system/apex/apexd/apexd_testdata/test.apex
      adb reboot; adb root; adb shell; cmd apexservice getActivePackages
      The test APEX is activated
      
      Change-Id: Ib9d4f5c699261f1fa1e6d557731767ee4d7168f9
      ce15e5e5
  3. Dec 01, 2018
  4. Nov 30, 2018
  5. Nov 29, 2018
  6. Nov 28, 2018
  7. Nov 27, 2018
    • Yiwei Zhang's avatar
      [gpuservice] allow "adb shell cmd gpu vkjson" · ff0f79c1
      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
      ff0f79c1
    • Branden Archer's avatar
      Allow init to set powerctl property · d36b1d5f
      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
      d36b1d5f
    • Nick Kralevich's avatar
      Add compile time check for expanded attribute neverallow failure · 94c88932
      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
      94c88932
    • Hongyi Zhang's avatar
      grant system_server read permission of server_configurable_flags_data · b61ac077
      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
      b61ac077
    • Daniel Rosenberg's avatar
      Allow vold to remount · 478ca55b
      Daniel Rosenberg authored
      remount is needed for commiting checkpoints under f2fs
      
      Test: vdc checkpoint commitChanges
      Bug: 111020314
      Change-Id: If7d4ab641b59d3e942d9d8a72bd91be08680227b
      478ca55b
    • Mikhail Naganov's avatar
    • Nick Kralevich's avatar
      f56b5d97
    • Nick Kralevich's avatar
      use hal_bootctl_server in neverallow rule · 536d3413
      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
      536d3413
Loading