Skip to content
Snippets Groups Projects
  1. Oct 13, 2017
    • Jeff Vander Stoep's avatar
      Track priv_app firstboot_prop denial · e82c8ab7
      Jeff Vander Stoep authored
      This denial should not be allowed. Add bug information to the denial
      to give context.
      
      Bug: 63801215
      Test: build
      Change-Id: I3dc5ce6a5aa1c6bf74c6fd13cab082c7f263c4e8
      e82c8ab7
    • Jeff Vander Stoep's avatar
      shell: allow reading battery info dirs in /sys · b4c63973
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { search } for comm="sh" name="bms" dev="sysfs" ino=47908
      scontext=u:r:shell:s0 tcontext=u:object_r:sysfs_batteryinfo:s0
      tclass=dir
      
      Test: build
      Change-Id: I8a0197417c47feefba084e9c75933d28c5f6e5f1
      b4c63973
  2. Oct 08, 2017
  3. Oct 07, 2017
    • Treehugger Robot's avatar
      e22e99a6
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Revert "Ensure /sys restrictions for isolated_apps" · ae48ecbd
      Nick Kralevich authored
      Bullhead and dragon are broken. Revert until I can fix
      those builds.
      
      Dragon:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26264 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      
      Bullhead:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_power_management:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_thermal:file { ioctl read lock open }; 
      libsepol.check_assertions: 3 neverallow failures occurred 
      
      
      This reverts commit 579366a0.
      
      Change-Id: I1ea4824e226c06628769898299f2e322060d0d06
      Test: policy compiles.
      ae48ecbd
    • Treehugger Robot's avatar
    • Nick Kralevich's avatar
      mediaextractor: ensure no direct open()s · d329e7eb
      Nick Kralevich authored
      Mediaextractor should only be operating on data passed directly to it.
      It shouldn't be attempting to open /data files on it's own.
      
      Add a neverallow statement (compile time assertion + CTS test) to ensure
      this is the case.
      
      Bug: 67454004
      Test: policy compiles. No runtime impact.
      Change-Id: Ie94d4cb9aece7e72fbd13321f339dcf9d44d5d77
      d329e7eb
    • Treehugger Robot's avatar
    • Jeff Vander Stoep's avatar
      Allow redeclaring typeattributes · 74b7071b
      Jeff Vander Stoep authored
      Allows partners to add a new attribute definition to their public
      policy without causing a compatibility failure with the AOSP system
      image.
      
      Bug: 67092827
      Bug: 37915794
      Test: build and boot aosp_sailfish with new type declared in public
          policy
      
      Change-Id: I015c26fa7c399423e8a6e7079b5689007d031479
      74b7071b
  4. Oct 06, 2017
  5. Oct 05, 2017
  6. Oct 04, 2017
    • Marco Nelissen's avatar
      Add drmserver permission for ephemeral apps · 32359638
      Marco Nelissen authored
      so they can use MediaExtractor too.
      
      Bug: 67406992
      Test: yes
      Change-Id: Iaacadc13b1fc032fe31eea1f3ecbbbabb741470a
      32359638
    • Treehugger Robot's avatar
      dfb7b7e3
    • Jeff Vander Stoep's avatar
      vold: temporarily re-grant access to default proc label · aadf611e
      Jeff Vander Stoep authored
      On Marlin/Sailfish, StorageManager tests in CTS are exposing a bug
      where the /proc/<pid>/ns/mnt files for system_server are briefly
      mislabeled as "proc" instead of "system_server". Resulting in the
      tests failing. Temporarily re-granting access to the default label
      until the labeling issue can be tracked down.
      
      Repro steps:
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases \
      -t android.os.storage.cts.StorageManagerTest
      
      Failures:
      
      android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor
      fail: java.lang.IllegalStateException: command '58 appfuse mount 10065
      959 0' failed with '400 58 Command failed'
      
      android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_async
      fail: java.lang.IllegalStateException: command '59 appfuse mount 10065
      959 1' failed with '400 59 Command failed'
      
      android.os.storage.cts.StorageManagerTest#testOpenProxyFileDescriptor_error
      fail: java.lang.IllegalStateException: command '60 appfuse mount 10065
      959 2' failed with '400 60 Command failed'
      
      From the log:
      
      10-04 20:41:22.972   595   604 E vold    : Failed to open namespace for
      /proc/959/ns/mnt: Permission denied
      10-04 20:41:22.967   604   604 W vold    : type=1400 audit(0.0:90): avc:
      denied { read } for dev="proc" ino=4026534249 scontext=u:r:vold:s0
      tcontext=u:object_r:proc:s0 tclass=file permissive=0
      10-04 20:41:23.051   604   604 W vold    : type=1400 audit(0.0:91): avc:
      denied { read } for dev="proc" ino=4026534249 scontext=u:r:vold:s0
      tcontext=u:object_r:proc:s0 tclass=file permissive=0
      10-04 20:41:23.054   595   604 E vold    : Failed to open namespace for
      /proc/959/ns/mnt: Permission denied
      10-04 20:41:23.081   604   604 W vold    : type=1400 audit(0.0:92): avc:
      denied { read } for dev="proc" ino=4026534249 scontext=u:r:vold:s0
      tcontext=u:object_r:proc:s0 tclass=file permissive=0
      10-04 20:41:23.086   595   604 E vold    : Failed to open namespace for
      /proc/959/ns/mnt: Permission denied
      
      sailfish:/ # ps -AZ | grep 959
      u:r:system_server:s0           system         959   628 \
      4557136 251500 SyS_epoll_wait 70e6df822c S system_server
      
      The file labels appear to be correct when checked manually.
      
      sailfish:/ # ls -lZ /proc/959/ns/
      lrwxrwxrwx 1 system system u:r:system_server:s0 0 2017-10-04 17:19 mnt -> mnt:[4026534249]
      lrwxrwxrwx 1 system system u:r:system_server:s0 0 2017-10-04 20:55 net -> net:[4026531906]
      
      Bug: 67049235
      Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases \
          -t android.os.storage.cts.StorageManagerTes
      
      Change-Id: Id4d200856c02c023c6f516e3f3bfa060e100086c
      aadf611e
    • Treehugger Robot's avatar
      dbe09253
    • Treehugger Robot's avatar
      c9599b34
    • Nick Kralevich's avatar
      Drop isolated_app auditallow rule. · 69ec0f8f
      Nick Kralevich authored
      This functionality is being used, apparently.
      
      Addresses the following auditallow spam:
      
        type=1400 audit(0.0:1039): avc: granted { write } for
        comm="Chrome_ProcessL"
        path="/storage/emulated/0/Android/data/com.bleacherreport.android.teamstream/cache/.com.google.Chrome.sk5n91"
        dev="sdcardfs" ino=1877565 scontext=u:r:isolated_app:s0:c512,c768
        tcontext=u:object_r:sdcardfs:s0 tclass=file
      
      Test: policy compiles.
      Bug: 32896414
      Change-Id: I627e20c38115f1d579e78ca12abfa717d32a155a
      69ec0f8f
    • Nick Kralevich's avatar
      tighten up some neverallow rules. · fc2449b4
      Nick Kralevich authored
      "append" has almost the same behavior as "write".
      
      Test: policy compiles.
      Change-Id: I3f85108e7918766f07e03f74c3f1d8e8084042b3
      fc2449b4
    • Jeff Vander Stoep's avatar
      Allow recovery to read /proc/cmdline · e629b7eb
      Jeff Vander Stoep authored
      avc:  denied  { read } for  pid=446 comm="recovery" name="cmdline"
      dev="proc" scontext=u:r:recovery:s0
      tcontext=u:object_r:proc_cmdline:s0 tclass=file
      
      Test: build
      Bug: 66497047
      Change-Id: I9f48db88bed0d6ac76fa2808a4913857230a5d4b
      e629b7eb
    • Jeff Vander Stoep's avatar
      Prepare python tests to be run in CTS · 3ca843a5
      Jeff Vander Stoep authored
      Bug: 37008075
      Test: build, all tests pass. Modify some attributes locally to
          cause tests to fail (verify that they are actually working).
      Change-Id: If9f9ece61dff835f38ef9c8a57f5a7baddbae5cd
      3ca843a5
    • Treehugger Robot's avatar
    • Tri Vo's avatar
    • Jeff Vander Stoep's avatar
      Move python sepolicy tests to embedded launcher · e9777e34
      Jeff Vander Stoep authored
      This is a necessary for enforcing these tests in CTS.
      
      Bug: 37008075
      Test: build
      Change-Id: I36b4ce71c26a0ba01cd0289fe363f0a9f7db1214
      (cherry picked from commit 8d614b3f)
      e9777e34
  7. Oct 03, 2017
  8. Oct 02, 2017
    • Treehugger Robot's avatar
      fab96b9a
    • Tri Vo's avatar
      Give uncrypt access to /proc/cmdline. · 9fa8ad6e
      Tri Vo authored
      Removes uncrypt access to the rest of /proc.
      Fixes this denial, which can be triggered from recovery_component_test:
      [  142.540819] type=1400 audit(1506983074.139:23): avc: denied { read }
      for pid=5767 comm=uncrypt name=cmdline dev=proc ino=4026532114
      scontext=u:r:uncrypt:s0 tcontext=u:object_r:proc_cmdline:s0 tclass=file
      permissive=0
      
      Bug: 66497047
      Test: recovery_component_test --gtest_filter=UncryptTest.*
      no more denials to /proc/cmdline
      Change-Id: If1a7630779d667d52a0cc44114ef6177982de21c
      9fa8ad6e
Loading