Skip to content
Snippets Groups Projects
  1. Dec 06, 2017
    • kaichieh's avatar
      Renames nonplat_* to vendor_* · 8b562206
      kaichieh authored
      This change renames the non-platform sepolicy files on a DUT from
      nonplat_* to vendor_*.
      
      It also splits the versioned platform sepolicy from vendor_sepolicy.cil
      to a new file /vendor/etc/selinux/plat_pub_versioned.cil. And only keeps
      vendor customizations in vendor_sepolicy.cil.
      
      Build variable BOARD_SEPOLICY_DIRS is also renamed to
      BOARD_VENDOR_SEPOLICY_DIRS.
      
      Bug: 64240127
      Test: boot an existing device
      Change-Id: I53a9715b2f9ddccd214f4cf9ef081ac426721612
      8b562206
  2. Dec 05, 2017
  3. Dec 04, 2017
  4. Dec 02, 2017
    • Andreas Gampe's avatar
      Sepolicy: Fix perfprofd path · 99e4f402
      Andreas Gampe authored
      Corresponds to commit 410cdebaf966746d6667d6d0dd4cee62262905e1 in
      system/extras.
      
      Bug: 32286026
      Test: m
      Change-Id: I1e0934aa5bf4649d598ec460128de6f02711597f
      99e4f402
  5. Dec 01, 2017
  6. Nov 30, 2017
  7. Nov 29, 2017
  8. Nov 28, 2017
    • Nicholas Sauer's avatar
      Make sepolicy-analyze for ATS. · b6d6db27
      Nicholas Sauer authored
      bug: 69430536
      Test: make ats-tradefed && ats-tradefed run ats -m
      GtsSecurityHostTestCases
      
      Merged-In: I617a7d08b1bf480f970bc8b4339fa6bbdc347311
      Change-Id: I1d4af47662de5db4e5f7bba244e42930b6de164b
      b6d6db27
    • Calin Juravle's avatar
      Allow system server to open profiles · 15da30b6
      Calin Juravle authored
      Allow system_server to open profile snapshots for read.
      System server never reads the actual content. It passes the descriptor to
      to privileged apps which acquire the permissions to inspect the profiles.
      
      Test: installd_dexopt_test
      Bug: 30934496
      Change-Id: I1d1f07a05261af25f6640040af1500c9a4d5b8d5
      15da30b6
    • Tri Vo's avatar
      Label /proc/sys/kernel/pid_max as proc_pid_max. · 4081fd39
      Tri Vo authored
      And give shell domain read access to /proc/sys/kernel/pic_max.
      
      Bug: 69569397
      Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
      --gtest_filter=pthread.pthread_mutex_owner_tid_limit
      Change-Id: Ib56c18ed553ad2c2113e6913788a4c00965483cc
      4081fd39
  9. Nov 27, 2017
    • Nick Kralevich's avatar
      Clean up old file-based OTA SELinux rules · b8b4f5d6
      Nick Kralevich authored
      Remove a number of SELinux rules which were required to support file
      based OTA. After this, we can have a much stronger assertion that files
      on /system are immutable. Tighten up the neverallow rules at the same
      time.
      
      Bug: 35853185
      Bug: 15575013
      Bug: 69664758
      Test: adb reboot recovery && adb sideload [file]
      Change-Id: I22aa208859b8478a2a90e1ed1c0f0d6b62a6664e
      b8b4f5d6
  10. Nov 22, 2017
    • Nick Kralevich's avatar
      Continuation of 9b2e0cbe · df642bef
      Nick Kralevich authored
      9b2e0cbe changed all uses of capability
      to global_capability_class_set but accidentally omitted one entry.
      Fix the one entry.
      
      Test: policy compiles.
      Change-Id: I1bb8c494a2660d9f02783c93b07d4238a2575106
      df642bef
    • Nick Kralevich's avatar
      Revert "Clean up old file-based OTA SELinux rules" · b6a05a93
      Nick Kralevich authored
      Self sideload OTA installation is aborted in #PPR1.171122.001.
      Likely cause is the removal of the file-based OTA rules. Revert
      the change while I investigate.
      
      This reverts commit 73885755.
      
      Bug: 35853185
      Bug: 69664758
      Bug: 15575013
      
      Change-Id: I65ca3bad7251f06df33eae8b2d4bcfada93ae9b8
      b6a05a93
    • Treehugger Robot's avatar
      5086506a
    • Jeff Vander Stoep's avatar
      Fix CTS regressions · 6a28b68d
      Jeff Vander Stoep authored
      Commit 7688161c "hal_*_(client|server) => hal(client|server)domain"
      added neverallow rules on hal_*_client attributes while simultaneously
      expanding these attribute which causes them to fail CTS neverallow
      tests. Remove these neverallow rules as they do not impose specific
      security properties that we want to enforce.
      
      Modify Other neverallow failures which were imposed on hal_foo
      attributes and should have been enforced on hal_foo_server attributes
      instead.
      
      Bug: 69566734
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed
          remaining failure appears to be caused by b/68133473
      Test: build taimen-user/userdebug
      
      Change-Id: I619e71529e078235ed30dc06c60e6e448310fdbc
      6a28b68d
    • Jiyong Park's avatar
      Label /vendor/priv-app as vendor_app_file · 76311578
      Jiyong Park authored
      In P, we will be supporting privileged apps in vendor partition, thus
      need to label /vendor/priv-app as vendor_app_file so that apps can exist
      under the dir.
      
      Bug: 35301609
      Test: N/A since there is no /vendor/priv-app yet. Framework change
      which is currently in the internal is required.
      
      Change-Id: I86a765ef9da5267113e64a7cbb38ba0abf5c2835
      76311578
    • Treehugger Robot's avatar
      4fbbd147
  11. Nov 21, 2017
    • Courtney Goeltzenleuchter's avatar
    • Nick Kralevich's avatar
      Clean up old file-based OTA SELinux rules · 73885755
      Nick Kralevich authored
      Remove a number of SELinux rules which were required to support file
      based OTA. After this, we can have a much stronger assertion that files
      on /system are immutable. Tighten up the neverallow rules at the same
      time.
      
      Bug: 35853185
      Bug: 15575013
      Test: adb reboot recovery && adb sideload [file]
      Change-Id: I4238d17808bed6a81f47e14eb1797496c07642e2
      73885755
    • Jeffrey Vander Stoep's avatar
    • Jeffrey Vander Stoep's avatar
      Revert "Fix CTS regressions" · cd69bebf
      Jeffrey Vander Stoep authored
      This reverts commit ed876a5e.
      
      Fixes user builds.
      libsepol.report_failure: neverallow on line 513 of system/sepolicy/public/domain.te (or line 9149 of policy.conf) violated by allow update_verifier misc_block_device:blk_file { ioctl read write lock append open }; 
      libsepol.check_assertions: 1 neverallow failures occurred 
      Error while expanding policy
      Bug: 69566734
      Test: build taimen-user
      Change-Id: I969b7539dce547f020918ddc3e17208fc98385c4
      cd69bebf
    • Jeff Vander Stoep's avatar
      Fix CTS regressions · ed876a5e
      Jeff Vander Stoep authored
      Commit 7688161c "hal_*_(client|server) => hal(client|server)domain"
      added neverallow rules on hal_*_client attributes while simultaneously
      expanding these attribute which causes them to fail CTS neverallow
      tests. Remove these neverallow rules as they do not impose specific
      security properties that we want to enforce.
      
      Modify Other neverallow failures which were imposed on hal_foo
      attributes and should have been enforced on hal_foo_server attributes
      instead.
      
      Bug: 69566734
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          CtsSecurityHostTestCases completed in 7s. 627 passed, 1 failed
          remaining failure appears to be caused by b/68133473
      Change-Id: I83dcb33c3a057f126428f88a90b95f3f129d9f0e
      ed876a5e
    • Benjamin Gordon's avatar
    • Courtney Goeltzenleuchter's avatar
      Add support for updated HW composer interface · 68f24388
      Courtney Goeltzenleuchter authored
      Test: build
      Bug: 63710530
      Change-Id: I85cddfaf3ec004165040935f8723e9eed0ef7900
      68f24388
    • Treehugger Robot's avatar
    • Benjamin Gordon's avatar
      sepolicy: Add rules for non-init namespaces · 9b2e0cbe
      Benjamin Gordon authored
      In kernel 4.7, the capability and capability2 classes were split apart
      from cap_userns and cap2_userns (see kernel commit
      8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
      run in a container with SELinux in enforcing mode.
      
      This change applies the existing capability rules to user namespaces as
      well as the root namespace so that Android running in a container
      behaves the same on pre- and post-4.7 kernels.
      
      This is essentially:
        1. New global_capability_class_set and global_capability2_class_set
           that match capability+cap_userns and capability2+cap2_userns,
           respectively.
        2. s/self:capability/self:global_capability_class_set/g
        3. s/self:capability2/self:global_capability2_class_set/g
        4. Add cap_userns and cap2_userns to the existing capability_class_set
           so that it covers all capabilities.  This set was used by several
           neverallow and dontaudit rules, and I confirmed that the new
           classes are still appropriate.
      
      Test: diff new policy against old and confirm that all new rules add
            only cap_userns or cap2_userns;
            Boot ARC++ on a device with the 4.12 kernel.
      Bug: crbug.com/754831
      
      Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
      9b2e0cbe
    • Jeff Vander Stoep's avatar
      Remove tracking bugs that have been resolved · 378763f2
      Jeff Vander Stoep authored
      Bug: 69175449
      Bug: 69197466
      Test: build
      Change-Id: I11e46b65449cb6f451ecab8d4dff9adc162fe115
      378763f2
  12. Nov 20, 2017
    • Vishnu Nair's avatar
      Allow system_server to remove files in /data/misc/wmtrace/* · df8d4b87
      Vishnu Nair authored
      Bug: 64831661
      Test: adb shell cmd window tracing start && adb shell cmd window tracing stop
      Test: adb shell su root dmesg | grep 'avc: '
      Change-Id: I1578aac9e102246ec722c78a6e9efb5581259d81
      df8d4b87
    • Jeff Vander Stoep's avatar
      Prepare treble_sepolicy_tests for inclusion in CTS · fe0910c9
      Jeff Vander Stoep authored
      Unconditionally compile treble_sepolicy_tests. Make compat
      files conditional on running the compat tests.
      
      Bug: 37008075
      Test: build
      Change-Id: Ib3aee6e93d285ca141803a13958fbcb38b891b68
      fe0910c9
    • Nick Kralevich's avatar
      Make /proc/sys/kernel/random available to everyone · 9d9c370f
      Nick Kralevich authored
      Similar to the way we handle /dev/random and /dev/urandom, make
      /proc/sys/kernel/random available to everyone.
      
        hostname:/proc/sys/kernel/random # ls -laZ
        total 0
        dr-xr-xr-x 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 .
        dr-xr-xr-x 1 root root u:object_r:proc:s0        0 2017-11-20 18:32 ..
        -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 boot_id
        -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 entropy_avail
        -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 poolsize
        -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 read_wakeup_threshold
        -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 urandom_min_reseed_secs
        -r--r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 uuid
        -rw-r--r-- 1 root root u:object_r:proc_random:s0 0 2017-11-20 19:02 write_wakeup_threshold
      
      boot_id (unique random number per boot) is commonly used by
      applications, as is "uuid". As these are random numbers, no sensitive
      data is leaked. The other files are useful to allow processes to
      understand the state of the entropy pool, and should be fairly benign.
      
      Addresses the following denial:
      
        type=1400 audit(0.0:207): avc: denied { read } for name="boot_id"
        dev="proc" ino=76194 scontext=u:r:untrusted_app_25:s0:c512,c768
        tcontext=u:object_r:proc:s0 tclass=file permissive=0
      
      Bug: 69294418
      Test: policy compiles.
      Change-Id: Ieeca1c654ec755123e19b4693555990325bd58cf
      9d9c370f
    • Jeff Vander Stoep's avatar
      Move platform/vendor data violations to device policy · d4785c37
      Jeff Vander Stoep authored
      Sharing data folders by path will be disallowed because it violates
      the approved API between platform and vendor components tested by
      VTS. Move all violating permissions from core selinux policy to
      device specific policy so that we can exempt existing devices from
      the ban and enforce it on new devices.
      
      Bug: 34980020
      Test: Move permissions. Build and test wifi, wifi AP, nfc, fingerprint
          and Play movies on Marlin and Taimen.
      Test: build on Angler, Bullhead, Dragon, Fugu, Marlin, Walleye
      
      Change-Id: Ib6fc9cf1403e74058aaae5a7b0784922f3172b4e
      d4785c37
Loading