Skip to content
Snippets Groups Projects
  1. Oct 25, 2017
    • Chad Brubaker's avatar
      Allow Instant/V2 apps to load code from /data/data · fe836817
      Chad Brubaker authored
      This restriction causes issues with dynamite.
      
      Since untrusted_v2_app was about enforcing this constraint put installed
      v2 applications back into the normal untrusted_app domain.
      
      Bug: 64806320
      Test: Manual test with app using dynamite module
      
      Change-Id: I3abf3ade64aaf689039a515de642759dd39ae6f7
      fe836817
  2. Sep 27, 2017
    • Jeff Vander Stoep's avatar
      system_server: read symlinks in /cache · 1f55d83d
      Jeff Vander Stoep authored
      type=1400 audit(0.0:6): avc: denied { read } for comm="Thread-5"
      name="cache" dev="dm-0" ino=13 scontext=u:r:system_server:s0
      tcontext=u:object_r:cache_file:s0 tclass=lnk_file permissive=0
      
      Bug: 64067152
      Bug: 65843095
      Test: build
      Change-Id: Ie90c0343a834aa87b7ded41f503e05d9b63b3244
      (cherry picked from commit a4cada74)
      1f55d83d
  3. Sep 23, 2017
    • Jeff Vander Stoep's avatar
      Remove domain_deprecated audit logging · 5d8b059f
      Jeff Vander Stoep authored
      These are no longer necessary as domain_deprecated has been
      removed in AOSP master.
      
      Bug: 66749762
      Test: build
      Merged-In: I99953ecc7d275fdbe8e56d8f47a27d1f9e1cc09a
      Change-Id: I01878a4410f8cb3c97ff96c67845dfaa7b0051ce
      5d8b059f
  4. Sep 01, 2017
  5. Aug 31, 2017
    • Steven Moreland's avatar
      Add permissions for screencap for dumpstate. · b5dd44b1
      Steven Moreland authored
      screencap domain needs additional permissions for
      dumpstate to dump screenshots.
      
      Test: adb shell cmd activity bug-report
      Bug: 65206688
      Change-Id: I824f345fd90d286454d570576c5888d7719c4c5c
      b5dd44b1
    • Steven Moreland's avatar
      Permissions for screencap saving files to /sdcard/ · c12c7349
      Steven Moreland authored
      Before screencap was in its own domain, it was able to do
      this by using all of shell's permissions.
      
      The following denials are caused (along with times from running the below test command)
      when screencap is invoked to write a file onto the sdcard:
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:23): avc: denied { read } for name="primary" dev="tmpfs" ino=19547 scontext=u:r:screencap:s0 tcontext=u:object_r:storage_file:s0 tclass=lnk_file permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:24): avc: denied { search } for name="/" dev="tmpfs" ino=19529 scontext=u:r:screencap:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:25): avc: denied { search } for name="user" dev="tmpfs" ino=19535 scontext=u:r:screencap:s0 tcontext=u:object_r:mnt_user_file:s0 tclass=dir permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:26): avc: denied { read } for name="primary" dev="tmpfs" ino=31198 scontext=u:r:screencap:s0 tcontext=u:object_r:mnt_user_file:s0 tclass=lnk_file permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:27): avc: denied { search } for name="/" dev="sdcardfs" ino=1310722 scontext=u:r:screencap:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:28): avc: denied { write } for name="image.png" dev="sdcardfs" ino=1310764 scontext=u:r:screencap:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:29): avc: denied { open } for path="/storage/emulated/0/image.png" dev="sdcardfs" ino=1310764 scontext=u:r:screencap:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=1
      08-30 21:03:32.009  4986  4986 I screencap: type=1400 audit(0.0:30): avc: denied { write open } for path="/data/media/0/image.png" dev="sda45" ino=1310764 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file permissive=1
      08-30 21:03:32.582  4990  4990 I screencap: type=1400 audit(0.0:31): avc: denied { execute } for name="sh" dev="dm-0" ino=998 scontext=u:r:screencap:s0 tcontext=u:object_r:shell_exec:s0 tclass=file permissive=1
      08-30 21:03:32.582  4990  4990 I screencap: type=1400 audit(0.0:32): avc: denied { read open } for path="/system/bin/sh" dev="dm-0" ino=998 scontext=u:r:screencap:s0 tcontext=u:object_r:shell_exec:s0 tclass=file permissive=1
      08-30 21:03:32.582  4990  4990 I screencap: type=1400 audit(0.0:33): avc: denied { execute_no_trans } for path="/system/bin/sh" dev="dm-0" ino=998 scontext=u:r:screencap:s0 tcontext=u:object_r:shell_exec:s0 tclass=file permissive=1
      08-30 21:03:32.582  4990  4990 I sh      : type=1400 audit(0.0:34): avc: denied { getattr } for path="/system/bin/sh" dev="dm-0" ino=998 scontext=u:r:screencap:s0 tcontext=u:object_r:shell_exec:s0 tclass=file permissive=1
      08-30 21:03:32.586  4990  4990 I sh      : type=1400 audit(0.0:35): avc: denied { ioctl } for path="socket:[57515]" dev="sockfs" ino=57515 ioctlcmd=5401 scontext=u:r:screencap:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=1
      08-30 21:03:32.586  4990  4990 I sh      : type=1400 audit(0.0:36): avc: denied { getattr } for path="socket:[57515]" dev="sockfs" ino=57515 scontext=u:r:screencap:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=1
      08-30 21:03:32.589  4991  4991 I sh      : type=1400 audit(0.0:37): avc: denied { execute_no_trans } for path="/system/bin/am" dev="dm-0" ino=1178 scontext=u:r:screencap:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1
      08-30 21:03:32.739  4992  4992 I cmd     : type=1400 audit(0.0:38): avc: denied { call } for scontext=u:r:screencap:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=1
      08-30 21:03:32.739  4992  4992 I cmd     : type=1400 audit(0.0:39): avc: denied { use } for path="/dev/null" dev="tmpfs" ino=19514 scontext=u:r:system_server:s0 tcontext=u:r:screencap:s0 tclass=fd permissive=1
      08-30 21:03:32.739  4992  4992 I cmd     : type=1400 audit(0.0:40): avc: denied { transfer } for scontext=u:r:screencap:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=1
      08-30 21:03:32.741   575   575 E SELinux : avc:  denied  { find } for service=activity pid=4992 uid=2000 scontext=u:r:screencap:s0 tcontext=u:object_r:activity_service:s0 tclass=service_manager permissive=1
      08-30 21:03:32.749   837   837 I Binder:837_9: type=1400 audit(0.0:41): avc: denied { call } for scontext=u:r:system_server:s0 tcontext=u:r:screencap:s0 tclass=binder permissive=1
      
      If /data/media/ is deleted, the following denials also occur:
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:43): avc: denied { search } for name="0" dev="sda45" ino=1310728 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:44): avc: denied { read open } for path="/data/media/0" dev="sda45" ino=1310728 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:48): avc: denied { write } for name="0" dev="sda45" ino=1310728 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:49): avc: denied { add_name } for name="image.png" scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:50): avc: denied { create } for name="image.png" scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:51): avc: denied { setattr } for name="image.png" dev="sda45" ino=1310764 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file permissive=1
      08-31 00:45:45.966  8899  8899 I screencap: type=1400 audit(0.0:53): avc: denied { write open } for path="/data/media/0/image.png" dev="sda45" ino=1310764 scontext=u:r:screencap:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file permissive=1
      08-31 01:04:29.741  6625  6625 W screencap: type=1400 audit(0.0:23): avc: denied { write } for name="0" dev="sdcardfs" ino=655364 scontext=u:r:screencap:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=0
      
      Test: adb shell screencap -p /sdcard/phone.png
      Bug: 65206688
      Change-Id: I808429b25fa3118fef7931050ab757c9bcd61881
      c12c7349
  6. Aug 28, 2017
  7. Aug 24, 2017
    • Jeff Vander Stoep's avatar
      Fix label on /dev/input · a43209eb
      Jeff Vander Stoep authored
      Commit 780a71e7 changed ueventd's selinux label lookup from /dev/input/
      to /dev/input which no longer matches the regex in core policy
      file_contexts. Fix the regex to match /dev/input and /dev/input/.
      
      avc: denied { read } for name="input" dev="tmpfs" ino=14092
      scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:device:s0
      tclass=dir
      avc: denied { open } for path="/dev/input" dev="tmpfs"
      ino=14092 scontext=u:r:hal_camera_default:s0
      tcontext=u:object_r:device:s0 tclass=dir
      
      Change-Id: I8f42f5cd96fc8353bf21d3ee6c3de9e2872f229f
      Fixes: 64997761
      Fixes: 64954704
      Test: no camera HAL denials
      a43209eb
  8. Aug 17, 2017
  9. Aug 16, 2017
    • Sandeep Patil's avatar
      DO NOT MERGE: Revert "Revert "Remove neverallow preventing hwservice access for apps."" · c9d4a86d
      Sandeep Patil authored
      
      This reverts commit ceed7204.
      
      New HALs services that are added in the policy while the CL was reverted
      will are not made visible to applications by default. They are:
        hal_neuralnetworks_hwservice
        hal_wifi_offload_hwservice
        system_net_netd_hwservice
        thermalcallback_hwservice
      
      Bug: 64578796
      Test: Boot device
      
      Change-Id: I84d65baddc757a5b0a38584430eff79a383aa8e0
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      c9d4a86d
    • Bowgo Tsai's avatar
      Moving adbd from rootdir to system/bin · e2423d14
      Bowgo Tsai authored
      Bug: 63910933
      Test: boot sailfish in normal mode, checks adbd is started
      Test: boot sailfish in recovery mode, checks adbd is started
      Test: boot bullhead in normal mode, checks adbd is started
      Test: boot bullhead in recovery mode, checks adbd is started
      
      Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79
      e2423d14
  10. Aug 14, 2017
    • Dan Cashman's avatar
      Move compatibility files out of prebuilts dir. · 78b3d573
      Dan Cashman authored
      The treble compatibility tests check for policy differences between old
      and new policy.  To do this correctly, we must not modify the policy which
      represents the older policies.  Move the files meant to be changed to a
      different location from the ones that are not meant to be touched to avoid
      any undesired changes to old policy, e.g. commit:
      2bdefd65078d890889672938c6f0d2accdd25bc5
      
      Bug: 36899958
      Test: Build-time tests build.
      Change-Id: I8fa3947cfae756f37556fb34e1654382e2e48372
      78b3d573
  11. Aug 11, 2017
    • Steven Moreland's avatar
      Add screencap domain. · f27bba93
      Steven Moreland authored
      Only seeing this denial in permissive:
      allow shell screencap_exec:file getattr;
      
      Bug: 37565047
      Test: adb shell screencap w/o root
      Test: cts-tradefed run cts-dev --module CtsAadbHostTestCases
      Change-Id: I9f31d2067e002e7042646ee38dbfc06687481ac7
      f27bba93
    • Martijn Coenen's avatar
      Prevent access to nonplat_service_contexts on full_treble. · 431a03bb
      Martijn Coenen authored
      On Full Treble devices, servicemanager should only service
      services from the platform service_contexts file.
      
      Created new type to separate plat_ and nonplat_service_contexts,
      and added new type to mapping (although I don't think this type
      should have been used by vendors).
      
      Bug: 36866029
      Test: Marlin/Taimen boot
      Change-Id: Ied112c64f22f8486a7415197660faa029add82d9
      431a03bb
  12. Aug 09, 2017
  13. Aug 04, 2017
    • Todd Kennedy's avatar
      Allow PackageManager to create a new service · 8bb80471
      Todd Kennedy authored
      A new API [getNamesForUids] was recently added to the PackageManager
      and this API needs to be accessible to native code. However, there
      were two constraints:
      1) Instead of hand-rolling the binder, we wanted to auto generate
      the bindings directly from the AIDL compiler.
      2) We didn't want to expose/annotate all 180+ PackageManager APIs
      when only a single API is needed.
      So, we chose to create a parallel API that can be used explicitly
      for native bindings without exposing the entirety of the
      PackageManager.
      
      Bug: 62805090
      Test: Manual
      Test: Create a native application that calls into the new service
      Test: See the call works and data and returned
      Change-Id: I0d469854eeddfa1a4fd04b5c53b7a71ba3ab1f41
      8bb80471
    • Todd Poynor's avatar
      thermal: sepolicy for thermalservice and Thermal HAL revision 1.1 · e9b2def7
      Todd Poynor authored
      Add sepolicy for thermalserviced daemon, IThermalService binder
      service, IThermalCallback hwservice, and Thermal HAL revision 1.1.
      
      Test: manual: marlin with modified thermal-engine.conf
      Bug: 30982366
      Change-Id: I207fa0f922a4e658338af91dea28c497781e8fe9
      (cherry picked from commit ec3b6b7e)
      e9b2def7
  14. Aug 01, 2017
    • Ruchi Kandoi's avatar
      Allow nfc application to set nfc property · 0393dafd
      Ruchi Kandoi authored
      type=1400 audit(1501520483.066:14): avc: denied { write } for pid=3330
      comm=4173796E635461736B202331 name="property_service" dev="tmpfs"
      ino=10749 scontext=u:r:nfc:s0 tcontext=u:object_r:property_socket:s0
      tclass=sock_file permissive=0
      
      Test: No sepolicy denials
      Bug: 64010793
      Change-Id: I8d73e8e19cd4d0a8c61f1f184820c53e5cc2b6d6
      (cherry picked from commit df964950)
      0393dafd
  15. Jul 28, 2017
    • Philip P. Moltmann's avatar
      Allow untrusted apps to read apks · bdac15aa
      Philip P. Moltmann authored
      Bug: 37281396
      Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
      Change-Id: If2094057d1acfbbf007ae108225decd9ad70e459
      bdac15aa
    • Niranjan Pendharkar's avatar
      Add system_net_netd_hwservice. · 5aef6a94
      Niranjan Pendharkar authored
      This hidl service provides functionality for oem networking
      configuration to vendor services which is required by
      at least some vendor radio modules.
      
      Test: VtsHalNetNetdV1_0TargetTest, netd_integration_test, netd_unit_test
      Test: no denials
      Bug: 36682246
      Change-Id: I86ac9082166b406b2fc814972375ba737460ad7b
      5aef6a94
  16. Jul 25, 2017
  17. Jul 18, 2017
  18. Jul 17, 2017
  19. Jul 13, 2017
    • Marc Hittinger's avatar
      Revert "Enable lowmemorykiler trace event toggling." · 4d0e433d
      Marc Hittinger authored
      Reverting this commit to fix CTS tests in oc-dr.
      This reverts commit 718e0852.
      
      Test: Tested lowmemorykiller tracing removed via traceur.
      Bug: 62908858
      Merged-In: Ifc1c6ac634b94e060ed1f311049bd37f6fcc8313
      
      Change-Id: Ie462decf32578bbe74a9ec9bdb8bb4ae1b87da29
      4d0e433d
    • Stephen Smalley's avatar
      sepolicy: Define validate_trans permission · 50992311
      Stephen Smalley authored
      
      Kernel commit f9df6458218f4fe ("selinux: export validatetrans
      decisions") introduced a /sys/fs/selinux/validatetrans pseudo file
      for use by userspace file system servers and defined a new validatetrans
      permission to control its use.
      
      Define the new permission in the Android SELinux policy.
      This change only defines the new permission; it does not allow it
      to any domains by default.
      
      This avoids a kernel message warning about the undefined permission on
      the policy load, ala:
      SELinux:  Permission validate_trans in class security not defined in policy.
      
      Test: Policy builds
      
      Change-Id: Ib922a83b7d8f94905207663a72f7a1bc3db8d2c2
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      50992311
    • Andreas Gampe's avatar
      App: Allow wrapped app to send pid · 3a5abb3b
      Andreas Gampe authored
      Allow wrapped app to send pid back to zygote.
      
      (cherry picked from commit ee694980)
      
      Bug: 63566721
      Bug: 63635227
      Test: lunch angler-userdebug && m
      Test: lunch angler-user && m
      Test: lunch angler-user && m && fastboot flashall && m cts && cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
      Change-Id: Ie1b41c3eb124aa5ee321c124d0121a0e965f0f0e
      3a5abb3b
    • Lorenzo Colitti's avatar
      Revert "Temporarily revert the SELinux policy for persist.netd.stable_secret." · 5b3efd3b
      Lorenzo Colitti authored
      This change must only be submitted when device-specific policies
      have been reverted.
      
      This reverts commit 07e631d2.
      
      Bug: 17613910
      Test: builds
      Change-Id: Ie33e293107bf1eba2498f2422d941544c76b8cad
      Merged-In: I356c39a5dc955b3d7c28d8c7baf2887a17beb272
      5b3efd3b
    • Andreas Gampe's avatar
      App: Allow wrapped app to send pid · ee694980
      Andreas Gampe authored
      Allow wrapped app to send pid back to zygote.
      
      Bug: 63566721
      Bug: 63635227
      Test: lunch angler-userdebug && m
      Test: lunch angler-user && m
      Test: lunch angler-user && m && fastboot flashall && m cts && cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
      Change-Id: Ie1b41c3eb124aa5ee321c124d0121a0e965f0f0e
      ee694980
  20. Jul 12, 2017
    • Jeff Vander Stoep's avatar
      suppress logspam · fc283871
      Jeff Vander Stoep authored
      avc: denied { search } for name="tmp" dev="sda13" ino=1867778
      scontext=u:r:isolated_app:s0:c512,c768
      tcontext=u:object_r:shell_data_file:s0 tclass=dir
      
      avc: denied { getattr } for path="/mnt/expand" dev="tmpfs" ino=9850
      scontext=u:r:webview_zygote:s0 tcontext=u:object_r:mnt_expand_file:s0
      tclass=dir
      
      Bug: 63631799
      Test: build. Denial no longer appears in the logs
      Change-Id: Ie8a297c73b0f0e9008a7bf24438ef5354bf893df
      fc283871
    • Peng Xu's avatar
      Allow system to dump sensor hal process · e4968f90
      Peng Xu authored
      Test: tested taking bugreport, sensor HAL traces show up in
            "VM TRACES JUST NOW"
      Test: tested trigger ANR by `adb shell am hang --allow-restart`,
            sensor HAL traces shows up in /data/anr/traces.txt
      Bug: 63096400
      Change-Id: I1d012b9d9810f987be7aaf9d68abfd9c3184ac5c
      e4968f90
    • Jeff Vander Stoep's avatar
      create separate usermodehelper type for sysfs · ece21859
      Jeff Vander Stoep authored
      Prevent files in /proc from incorrectly having sysfs_type attribute.
      
      Rework neverallows so that ueventd has write access to all of
      /sys which it needs to handle uevents.
      
      Bug: 63147833
      Test: Build. Flash angler, verify files are correctly labeled and no
          new denials are in the logs.
      
      Change-Id: Ib94d44e78cee0e83e2ac924f1c72e611e8e73558
      ece21859
    • Lorenzo Colitti's avatar
      Revert "Temporarily revert the SELinux policy for persist.netd.stable_secret." · e2188458
      Lorenzo Colitti authored
      This re-adds netd_stable_secret_prop to core sepolicy. It was
      temporarily reverted so it could be added to device-specific
      policy in oc-dr1-dev.
      
      DO NOT SUBMIT until http://ag/2528214 has automerged to master.
      
      This reverts commit 9fa11b77.
      
      Bug: 17613910
      Test: make -j64 bootimage
      Change-Id: I356c39a5dc955b3d7c28d8c7baf2887a17beb272
      e2188458
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove system_file rules · cf376fd4
      Jeff Vander Stoep authored
      Logs indicate that these rules have already been moved to the
      domains that need them.
      
      Bug: 28760354
      Test: build
      Change-Id: I588a1e7ea7ef984907b79a5a391efb2dcd6e6431
      (cherry picked from commit 78b016ee80e48a874511b5bbd6842a2062e049e9)
      cf376fd4
  21. Jul 11, 2017
    • Lorenzo Colitti's avatar
      Temporarily revert the SELinux policy for persist.netd.stable_secret. · 9fa11b77
      Lorenzo Colitti authored
      This change did not make it into core sepolicy in time for O.
      The revert allows devices to define these selinux policies in
      vendor-specific sepolicy instead of core sepolicy. It is
      necessary because:
      
      1. It is too late to change property_contexts in O.
      2. Adding the netd_stable_secret prop to vendor sepolicy results
         in a duplicate definition error at compile time.
      3. Defining a new vendor-specific context (such as
         net_stable_secret_vendor_prop) and applying it to
         persist.netd.stable_secret results in the device not booting
         due to attempting to apply two different contexts to the same
         property.
      
      Lack of the sepolicy no longer breaks wifi connectivity now that
      IpManager no longer considers failure to set the stable secret to
      be a fatal error.
      
      Once all interested devices have adopted the vendor sepolicy,
      this policy can safely be reinstated by reverting said vendor
      sepolicies in internal master.
      
      This reverts commit abb1ba65.
      
      Bug: 17613910
      Test: bullhead builds, boots, connects to wifi
      Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
      9fa11b77
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove rootfs access · a12aad45
      Jeff Vander Stoep authored
      Grant audited permissions collected in logs.
      
      tcontext=platform_app
      avc: granted { getattr } for comm=496E666C6174657254687265616420
      path="/" dev="dm-0" ino=2 scontext=u:r:platform_app:s0:c512,c768
      tcontext=u:object_r:rootfs:s0 tclass=dir
      
      tcontext=system_app
      avc: granted { getattr } for comm="android:ui" path="/" dev="dm-0"
      scontext=u:r:system_app:s0 tcontext=u:object_r:rootfs:s0 tclass=dir
      avc: granted { getattr } for comm="android:ui" path="/" dev="dm-0"
      scontext=u:r:system_app:s0 tcontext=u:object_r:rootfs:s0 tclass=dir
      
      tcontext=update_engine
      avc: granted { getattr } for comm="update_engine" path="/" dev="dm-0"
      ino=2 scontext=u:r:update_engine:s0 tcontext=u:object_r:rootfs:s0
      tclass=dir
      avc: granted { getattr } for comm="update_engine" path="/fstab.foo"
      dev="dm-0" ino=25 scontext=u:r:update_engine:s0
      tcontext=u:object_r:rootfs:s0 tclass=file
      avc: granted { read open } for comm="update_engine" path="/fstab.foo"
      dev="dm-0" ino=25 scontext=u:r:update_engine:s0
      tcontext=u:object_r:rootfs:s0 tclass=file
      
      Bug: 28760354
      Test: build
      Change-Id: I6135eea1d10b903a4a7e69da468097f495484665
      a12aad45
    • Robert Benea's avatar
      sepolicy: fix support for lmkd · e62cf5e5
      Robert Benea authored
      Allow lmkd to access /dev/memcg once again.
      
      Test: lmkd can access memcg
      bug: 36588803
      Change-Id: I1f46b438050d95cebd2fcc495938192305fc9fc9
      e62cf5e5
  22. Jul 10, 2017
    • Stephen Smalley's avatar
      sepolicy: Define and allow map permission · 4397f082
      Stephen Smalley authored
      
      Kernel commit 3ba4bf5f1e2c ("selinux: add a map permission check for mmap")
      added a map permission check on mmap so that we can
      distinguish memory mapped access (since it has different implications
      for revocation).  The purpose of a separate map permission check on
      mmap(2) is to permit policy to prohibit memory mapping of specific files
      for which we need to ensure that every access is revalidated, particularly
      useful for scenarios where we expect the file to be relabeled at runtime
      in order to reflect state changes (e.g. cross-domain solution, assured
      pipeline without data copying).  The kernel commit is anticipated to
      be included in Linux 4.13.
      
      This change defines map permission for the Android policy.  It mirrors
      the definition in the kernel classmap by adding it to the common
      definitions for files and sockets.  This will break compatibility for
      kernels that predate the dynamic class/perm mapping support (< 2.6.33);
      on such kernels, one would instead need to add map permission
      to the end of each file and socket access vector.
      
      This change also adds map permission to the global macro definitions for
      file permissions, thereby allowing it in any allow rule that uses these
      macros, and to specific rules allowing mapping of files from /system
      and executable types. This should cover most cases where it is needed,
      although it may still need to be added to specific allow rules when the
      global macros are not used.
      
      Test: Policy builds
      
      Change-Id: Iab3ccd2b6587618e68ecab58218838749fe5e7f5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4397f082
Loading