Skip to content
Snippets Groups Projects
  1. 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
  2. Nov 21, 2017
    • 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
    • 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
  3. 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
  4. Nov 17, 2017
    • Jeff Vander Stoep's avatar
      Allow AOSP processes to read pm_prop · 0f5ad4e5
      Jeff Vander Stoep authored
      Exclude vendor processes.
      
      Bug: 69309298
      Test: cts-tradefed run cts -m CtsCompilationTestCases
          completed in 33s. 5 passed, 0 failed
      Test: runtest frameworks-services -c \
          com.android.server.pm.dex.DexoptOptionsTests \
          --install=".*FrameworksServicesTests.apk"
          OK (5 tests)
      
      Change-Id: Ic02caf373e2214b4b931a724ca8d4f4effbc0741
      0f5ad4e5
    • Tri Vo's avatar
      6faa3a1a
    • Treehugger Robot's avatar
      cd753d11
    • Treehugger Robot's avatar
    • Tri Vo's avatar
      shell: neverallow access to 'proc' label. · c4ef3630
      Tri Vo authored
      Added access to proc_uptime and proc_asound to address these denials:
      
      avc: denied { read } for name="uptime" dev="proc" ino=4026532080
      scontext=u:r:shell:s0 tcontext=u:object_r:proc_uptime:s0 tclass=file
      permissive=1
      
      avc: denied { getattr } for path="/proc/asound/version" dev="proc"
      ino=4026532017 scontext=u:r:shell:s0 tcontext=u:object_r:proc_asound:s0
      tclass=file permissive=1
      
      Bug: 65643247
      Test: device boots with no denial from 'shell' domain.
      Test: lsmod, ps, top, netstat
      Test: No denials triggered from CtsSecurityHostTestCases
      Test: external/toybox/run-tests-on-android.sh does not pass, but triggers
      no denials from 'shell' domain to 'proc' type.
      
      Change-Id: Ia4c26fd616e33e5962c6707a855dc24e338ec153
      c4ef3630
    • Tri Vo's avatar
      499fd010
    • Vishnu Nair's avatar
      Add window trace files SELinux policy rules · 2d6942d3
      Vishnu Nair authored
      - Allow system_server to create and write to /data/misc/wmtrace/*
      - Allow surfaceflinger to create and write files from /data/misc/wmtrace/*
      - Allow dumpstate to read files from /data/misc/wmtrace/*
      permissions are restricted to userdebug or eng builds
      
      Bug: 64831661
      
      Test: adb shell cmd window tracing start && adb shell cmd window tracing stop
      Test: adb shell su root service call SurfaceFlinger 1025 i32 1 >/dev/null && adb shell su root service call SurfaceFlinger 1025 i32 0 >/dev/null
      Test: adb bugreport ~/tmp.zip && adb shell su root dmesg | grep 'avc: '
      
      Change-Id: I0b15166560739d73d7749201f3ad197dbcf5791c
      2d6942d3
    • Treehugger Robot's avatar
    • Tri Vo's avatar
      mediaserver: remove access to 'sysfs' type. · 2ea12cd3
      Tri Vo authored
      Bug: 65643247
      Test: cts-tradefed run cts-dev -m \
      CtsMediaTestCases --compatibility:module-arg \
      CtsMediaTestCases:include-annotation:\
      android.platform.test.annotations.RequiresDevice
      No denials from mediaserver domain to sysfs type are observed.
      Change-Id: Icb5c12f04af213452d82e226993fe13085c5c33f
      2ea12cd3
  5. Nov 16, 2017
  6. Nov 15, 2017
    • Tom Cherry's avatar
      Copy a dontaudit from init to vendor_init · 63492cd6
      Tom Cherry authored
      Copy init's dontaudit for sysfs:dir write; to calm the below denials:
      
      avc:  denied  { write } for  pid=542 comm="init" name="1da4000.ufshc" dev="sysfs" ino=21752 scontext=u:r:vendor_init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
      avc: denied { write } for pid=542 comm="init" name="1da4000.ufshc" dev="sysfs" ino=21752 scontext=u:r:vendor_init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
      
      Bug: 62875318
      Test: use pixel + factory reset + vendor_init
      Change-Id: I686b51c4f340b3565ea24f00516ebde846be7a89
      63492cd6
    • Calin Juravle's avatar
      Revert "Put pm.* property in new pm_prop context" · 248b6dc6
      Calin Juravle authored
      This reverts commit d1cf3a40.
      
      Reason for revert: It breaks CTS b/69309298 and other platform tests which read pm.dexopt properties.
      
      Change-Id: I5c7cde041113e9c19bb23218edd99f699fcf4a06
      248b6dc6
    • Chenbo Feng's avatar
      Allow netd to read the /dev/xt_qtaguid · cc781f76
      Chenbo Feng authored
      After move qtaguid control interface into netd. Netd need to open the
      xt_qtaguid resource tracking misc dev to make sure xt_qtaguid module is
      successfully initialized before taking action. This selinux rule change
      allows netd to do so and it is the same privilege normal apps currently
      have.
      
      Test: No more selinux denials on netd access qtaguid_device
      Bug: 30950746
      Change-Id: I79a98bbda3f3fdb85140a06a7532cdcc4354c518
      cc781f76
    • Tri Vo's avatar
    • Treehugger Robot's avatar
    • Jeffrey Vander Stoep's avatar
    • Tri Vo's avatar
      update_verifier: neverallow access to 'sysfs' label. · 7dd4d906
      Tri Vo authored
      Bug: 65643247
      Test: aosp_walleye-userdebug builds
      Test: aosp_sailfish-userdebug builds
      Change-Id: Iaebd368b84259783fbdc4778988bdb7ba0df300b
      7dd4d906
    • Tri Vo's avatar
      charger: read permissions to /sys/power/state · cb043a58
      Tri Vo authored
      Fixes these denials:
      avc:  denied  { read } for  pid=585 comm="charger" name="state"
      dev="sysfs" ino=18844 scontext=u:r:charger:s0
      tcontext=u:object_r:sysfs_power:s0 tclass=file permissive=1
      
      avc:  denied  { open } for  pid=585 comm="charger"
      path="/sys/power/state" dev="sysfs" ino=18844 scontext=u:r:charger:s0
      tcontext=u:object_r:sysfs_power:s0 tclass=file permissive=1
      
      Test: above denials not observed in charger mode.
      Change-Id: I5660e63315fada7f24d6cfe2e0bd2b383b556670
      cb043a58
  7. Nov 14, 2017
    • Jeff Vander Stoep's avatar
      Add tracking bugs to crash_dump denials · 41401f47
      Jeff Vander Stoep authored
      avc: denied { search } for name="com.sf.activity" dev="sda35"
      ino=1444147 scontext=u:r:crash_dump:s0:c512,c768
      tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir
      avc: denied { search } for comm="crash_dump64"
      name="com.android.bluetooth" dev="sda13" ino=1442292
      scontext=u:r:crash_dump:s0 tcontext=u:object_r:bluetooth_data_file:s0
      tclass=dir
      avc: denied { search } for comm="crash_dump64" name="overlay" dev="dm-1"
      ino=938 scontext=u:r:crash_dump:s0
      tcontext=u:object_r:vendor_overlay_file:s0 tclass=dir permissive=0
      
      Bug: 68705274
      Bug: 68319037
      Test: build
      Change-Id: I44075ac6bf6447d863373c97ba10eadf59d2d22f
      41401f47
    • Tianjie Xu's avatar
      Do not audit the fsetid capability for update engine · 29fc85ee
      Tianjie Xu authored
      There's a selinux denial for update_engine after go/aog/530462; the
      denial is likely due to the setgid bit of the
      update_engine_log_data_file.
      Message:
      11-11 02:07:54.843   870   870 I auditd  : type=1400 audit(0.0:4): avc:
      denied { fsetid } for comm="update_engine" capability=4
      scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability permissive=0
      11-11 02:07:54.843   870   870 I auditd  : type=1400 audit(0.0:5): avc:
      denied { fsetid } for comm="update_engine" capability=4
      scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability permissive=0
      11-11 02:07:54.843   870   870 I auditd  : type=1400 audit(0.0:4): avc:
      denied { fsetid } for comm="update_engine" capability=4
      scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability permissive=0
      11-11 02:07:54.843   870   870 I auditd  : type=1400 audit(0.0:5): avc:
      denied { fsetid } for comm="update_engine" capability=4
      scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability permissive=0
      
      Bug: 69197466
      Test: denial message gone on sailfish.
      Change-Id: I0fdc285e4a4faa8dc37b4907484b3c79d4cc49cf
      29fc85ee
    • Treehugger Robot's avatar
  8. Nov 13, 2017
Loading