Skip to content
Snippets Groups Projects
  1. Jan 23, 2017
  2. Jan 20, 2017
  3. Jan 18, 2017
    • Josh Gao's avatar
      Introduce crash_dump debugging helper. · cb3eb4ee
      Josh Gao authored
      Replace the global debuggerd with a per-process debugging helper that
      gets exec'ed by the process that crashed.
      
      Bug: http://b/30705528
      Test: crasher/crasher64, `debuggerd <pid>`, `kill -ABRT <pid>`
      Change-Id: Iad1b7478f7a4e2690720db4b066417d8b66834ed
      cb3eb4ee
  4. Jan 06, 2017
    • Nick Kralevich's avatar
      Refine rules for accessing /dev/__properties__ · 32c4a27c
      Nick Kralevich authored
      Don't allow processes to list out the contents of the directory
      /dev/__properties__. This is an implementation specific detail that
      shouldn't be visible to processes.
      
      Test: Device boots and no problems reading individual properties.
      Test: ls -la /dev/__properties__ fails
      Change-Id: I4df6a829b0d22e30fb2c38030c690fc4a356f6a3
      32c4a27c
  5. Dec 29, 2016
    • Alex Klyubin's avatar
      Enable ADB shell access to ro.serialno · cba41e5a
      Alex Klyubin authored
      6e4508e6 inadvertently removed access
      to ro.serialno and ro.boot.serialno from ADB shell. This is needed for
      CTS. This commit thus reinstates the access.
      
      Test: adb shell getprop ro.serialno
      Bug: 33700679
      Change-Id: I62de44b1631c03fcd64ceabaf33bbaeb869c2851
      cba41e5a
  6. Dec 27, 2016
    • Alex Klyubin's avatar
      Remove access to ro.runtime.firstboot from apps · 062236a8
      Alex Klyubin authored
      ro.runtime.firstboot system property is only used internally by
      system_server to distinguish between first start after boot from
      consecutive starts (for example, this happens when full-disk
      encryption is enabled). The value of the property is a
      millisecond-precise timestamp which can help track individual
      device. Thus apps should not have access to this property.
      
      Test: Device boots fine, reading ro.runtime.firstboot from an app results in an error and SELinux denial.
      Bug: 33700679
      Change-Id: I4c3c26a35c5dd840bced3a3e53d071f45317f63c
      062236a8
  7. Dec 22, 2016
    • Alex Klyubin's avatar
      Restrict access to ro.serialno and ro.boot.serialno · 20151072
      Alex Klyubin authored
      This restricts access to ro.serialno and ro.boot.serialno, the two
      system properties which contain the device's serial number, to a
      select few SELinux domains which need the access. In particular, this
      removes access to these properties from Android apps. Apps can access
      the serial number via the public android.os.Build API. System
      properties are not public API for apps.
      
      The reason for the restriction is that serial number is a globally
      unique identifier which cannot be reset by the user. Thus, it can be
      used as a super-cookie by apps. Apps need to wean themselves off of
      identifiers not resettable by the user.
      
      Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome
      Test: Access the device via ADB (ADBD exposes serial number)
      Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo
      Bug: 31402365
      Bug: 33700679
      Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
      20151072
  8. Dec 15, 2016
    • Nick Kralevich's avatar
      Enforce assumptions around metadata_block_device · 5207ca6a
      Nick Kralevich authored
      Add a compile time assertion that only authorized SELinux domains are
      allowed to touch the metadata_block_device. This domain may be wiped at
      will, and we want to ensure that we're not inadvertently destroying
      other people's data.
      
      Test: policy compiles.
      Change-Id: I9854b527c3d83e17f717d6cc8a1c6b50e0e373b6
      5207ca6a
  9. Dec 06, 2016
    • dcashman's avatar
      sepolicy: add version_policy tool and version non-platform policy. · 2e00e637
      dcashman authored
      In order to support platform changes without simultaneous updates from
      non-platform components, the platform and non-platform policies must be
      split.  In order to provide a guarantee that policy written for
      non-platform objects continues to provide the same access, all types
      exposed to non-platform policy are versioned by converting them and the
      policy using them into attributes.
      
      This change performs that split, the subsequent versioning and also
      generates a mapping file to glue the different policy components
      together.
      
      Test: Device boots and runs.
      Bug: 31369363
      Change-Id: Ibfd3eb077bd9b8e2ff3b2e6a0ca87e44d78b1317
      2e00e637
  10. Dec 05, 2016
    • Nick Kralevich's avatar
      Revert "ueventd.te: auditallow device:chr_file" · e78fa1bf
      Nick Kralevich authored
      Broke the dragon build:
      
      libsepol.report_failure: neverallow on line 304 of system/sepolicy/public/domain.te (or line 8638 of policy.conf) violated by allow kernel device:chr_file { create setattr };
      libsepol.check_assertions: 1 neverallow failures occurred
      Error while expanding policy
      
      This reverts commit ed0b4eb3.
      
      Change-Id: I5d55ab59ed72ce7c19a10ddbb374f9f3b3fae4fd
      e78fa1bf
    • Nick Kralevich's avatar
      ueventd.te: auditallow device:chr_file · ed0b4eb3
      Nick Kralevich authored
      By default, files created in /dev are labeled with the "device" label
      unless a different label has been assigned. The direct use of this
      generic label is discouraged (and in many cases neverallowed) because
      rules involving this label tend to be overly broad and permissive.
      
      Today, generically labeled character devices can only be opened, read,
      or written to by init and ueventd.
      
        $ sesearch --allow -t device -c chr_file -p open,read,write out/target/product/marlin/root/sepolicy
        allow init device:chr_file { setattr read lock getattr write ioctl open append };
        allow ueventd device:chr_file { read lock getattr write ioctl open append };
      
      this is enforced by the following SELinux neverallow rule (compile time
      assertion + CTS test):
      
        neverallow { domain -init -ueventd } device:chr_file { open read write };
      
      Start auditallowing ueventd access to /dev character device files with the
      default SELinux label. This doesn't appear to be used, but let's prove it.
      While ueventd is expected to create files in /dev, it has no need to open
      most of the files it creates.
      
      Note, however, that because ueventd has mknod + setfscreate permissions,
      a malicious or compromised ueventd can always create a device node under
      an incorrect label, and gain access that way.
      
      The goal of this change is to prove that no process other than init are
      accessing generically labeled files in /dev.
      
      While I'm here, tighten up the compile time assertion for
      device:chr_file to include more permissions.
      
      Test: policy compiles + device boots with no granted messages.
      Change-Id: Ic98b0ddc631b49b09e58698d9f40738ccedd1fd0
      ed0b4eb3
    • Max's avatar
      /dev/port does not seem to be used, adding in rules to confirm. · c27c23fb
      Max authored
      Only init and ueventd have any access to /dev/port, and neither should
      have any use for it. As it stands, leaving port in just represents
      additional attack surface with no useful functionality, so it should be
      removed if possible, not only from Pixel devices, but from all Android
      devices.
      
      Test: The phone boots successfully
      
      Bug:33301618
      Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
      c27c23fb
  11. Nov 23, 2016
  12. Nov 21, 2016
    • Nick Kralevich's avatar
      Collapse urandom_device into random_device · 5eadcb8c
      Nick Kralevich authored
      urandom_device and random_device have the exact same security
      properties. Collapse them into one type.
      
      Test: device boots and /dev/urandom is labeled correctly.
      Change-Id: I12da30749291bc5e37d99bc9422bb86cb58cec41
      5eadcb8c
  13. Nov 20, 2016
    • Daniel Micay's avatar
      only permit text relocations in untrusted_app · dc083f59
      Daniel Micay authored
      The other domains either don't have the same backwards compatibility
      issues (isolated_app) or are privileged components that are pretty much
      part of the platform and can be expected to meet a higher standard.
      
      It would be possible to expose a build option for disabling the ART JIT,
      allowing conditional removal of execmem from some of these domains too
      (ones not ever using the WebView, until that's always in isolated_app).
      
      Bug: 20013628
      Change-Id: Ic22513157fc8b958b2a3d60381be0c07b5252fa5
      dc083f59
  14. Nov 12, 2016
  15. Nov 11, 2016
    • Nick Kralevich's avatar
      property.te: delete security_prop · ee751c33
      Nick Kralevich authored
      This property is never used.
      
      Test: policy compiles
      Change-Id: I43ace92950e1221754db28548031fbbfc0437d7a
      ee751c33
    • Robert Sesek's avatar
      Add the "webview_zygote" domain. · dc43f7cd
      Robert Sesek authored
      The webview_zygote is a new unprivileged zygote and has its own sockets for
      listening to fork requests. However the webview_zygote does not run as root
      (though it does require certain capabilities) and only allows dyntransition to
      the isolated_app domain.
      
      Test: m
      Test: angler boots
      
      Bug: 21643067
      Change-Id: I89a72ffe6dcb983c4a44048518efd7efb7ed8e83
      dc43f7cd
  16. Nov 08, 2016
    • Nick Kralevich's avatar
      Revert "Restore system_server ioctl socket access." · 58305da9
      Nick Kralevich authored
      The underlying ioctl denial was fixed in device-specific policy.
      It's not needed in core policy.
      
      A search of SELinux denials shows no reported denials, other than the
      ones showing up on marlin.
      
      This reverts commit ec3285cd.
      
      (cherrypicked from commit 863ce3e7)
      
      Test: AndroiTS GPS Test app shows GPS data, no SELinux denials.
      Bug: 32290392
      Change-Id: I1ba7bad43a2cdd7cdebbe1c8543a71eee765621d
      58305da9
    • Nick Kralevich's avatar
      profman/debuggerd: allow libart_file:file r_file_perms · 364fd197
      Nick Kralevich authored
      Addresses the following auditallow spam:
      
      avc: granted { read open } for comm="profman"
      path="/system/lib/libart.so" dev="dm-0" ino=1368 scontext=u:r:profman:s0
      tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read open } for comm="debuggerd64"
      path="/system/lib64/libart.so" dev="dm-0" ino=1897
      scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { getattr } for comm="debuggerd64"
      path="/system/lib64/libart.so" dev="dm-0" ino=1837
      scontext=u:r:debuggerd:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      Test: Policy compiles. Not a tightening of rules.
      Change-Id: I501b0a6a343c61b3ca6283647a18a9a15deddf2a
      364fd197
  17. Nov 04, 2016
  18. Oct 28, 2016
    • Nick Kralevich's avatar
      Get rid of auditallow spam. · 79a08e13
      Nick Kralevich authored
      Fixes the following SELinux messages when running adb bugreport:
      
      avc: granted { read } for name="libart.so" dev="dm-0" ino=1886
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read open } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { getattr } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read execute } for path="/system/lib64/libart.so"
      dev="dm-0" ino=1886 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for path="/data/dalvik-cache/arm64" dev="dm-2"
      ino=106290 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=dir
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { read } for name="system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { read open } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      [  169.349480] type=1400 audit(1477679159.734:129): avc: granted { read
      } for pid=6413 comm="main" name="ipv6_route" dev="proc" ino=4026535947
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350030] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350361] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350399] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350963] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351002] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351330] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351366] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351861] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351910] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353105] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353186] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353594] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353636] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354230] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354437] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.395359] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      Test: policy compiles
      Test: adb bugreport runs without auditallow messages above.
      Bug: 32246161
      Change-Id: Ie0ab2ed3c6babc1f93d3b8ae47c92dd905ebc93a
      79a08e13
  19. Oct 27, 2016
  20. Oct 07, 2016
  21. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
  22. Sep 27, 2016
    • Jeff Vander Stoep's avatar
      Audit access to libart · 88cef4df
      Jeff Vander Stoep authored
      Grant access to all processes and audit access. The end goal is to
      whitelist all access to the interpreter. Several processes including
      dex2oat, apps, and zygote were observed using libart, so omit them
      from auditing and explicitly grant them access.
      
      Test: Angler builds and boots
      
      Bug: 29795519
      Change-Id: I9b93c7dbef5c49b95a18fd26307955d05a1c8e88
      88cef4df
  23. Sep 14, 2016
  24. Sep 13, 2016
    • Andreas Gampe's avatar
      Sepolicy: Add otapreopt_slot · a3a0bb44
      Andreas Gampe authored
      (cherry picked from commit eb717421)
      
      The new A/B OTA artifact naming scheme includes the target slot so
      that the system is robust with respect to unexpected reboots. This
      complicates the renaming code after reboot, so it is moved from the
      zygote into a simple script (otapreopt_slot) that is hooked into
      the startup sequence in init.
      
      Give the script the subset of the rights that the zygote had so that
      it can move the artifacts from /data/ota into /data/dalvik-cache.
      Relabeling will be done in the init rc component, so relabeling
      rights can be completely removed.
      
      Bug: 25612095
      Bug: 28069686
      Change-Id: Iad56dc3d78ac759f4f2cce65633cdaf1cab7631b
      a3a0bb44
    • Andreas Gampe's avatar
      Sepolicy: allow otapreopt_chroot to mount vendor · c9ce12ba
      Andreas Gampe authored
      (cherry picked from commit ec4b9d67)
      
      Vendor apps are usually not preopted, so A/B dexopt should pick
      them up. update_engine is not mounting the vendor partition, so
      let otapreopt_chroot do the work.
      
      This change gives otapreopt_chroot permission to mount /vendor
      into the chroot environment.
      
      Bug: 25612095
      Bug: 29498238
      Change-Id: I5a77bdb78a8e478ce10f6c1d0f911a8d6686becb
      c9ce12ba
  25. Sep 12, 2016
    • Alex Light's avatar
      Allow cppreopts to work with selinux · b7ebb32f
      Alex Light authored
      (cherry picked from commit d3edd6b5)
      
      Bug: 29278988
      Change-Id: I199572377a6b5c33116c718a545159ddcf50df30
      b7ebb32f
    • Nick Kralevich's avatar
      fix build: exclude bluetooth from neverallow restriction · e1b00f39
      Nick Kralevich authored
      Bluetooth is sometimes started from init.
      
      Addresses the following compiler error:
      
        libsepol.report_failure: neverallow on line 489 of
        system/sepolicy/domain.te (or line 9149 of policy.conf) violated by
        allow init bluetooth:process { transition };
        libsepol.check_assertions: 1 neverallow failures occurred
        Error while expanding policy
      
      (cherry-picked from commit 7e380216)
      
      Change-Id: I2bc1e15217892e1ba2a62c9683af0f3c0aa16b86
      e1b00f39
    • Eino-Ville Talvala's avatar
      Rework neverallow for /data execute permission · 6bb6c16e
      Eino-Ville Talvala authored
      Previously appdomains allowed to execute off of /data
      where whitelisted. This had the unfortunate side effect of
      disallowing the creation of device specific app domains
      with fewer permissions than untrusted_app. Instead grant
      all apps a neverallow exemption and blacklist specific app
      domains that should still abide by the restriction.
      
      This allows devices to add new app domains that need
      /data execute permission without conflicting with this rule.
      
      Bug: 26906711
      
      (cherry picked from commit c5266df9)
      
      Change-Id: I4adb58e8c8b35122d6295db58cedaa355cdd3924
      6bb6c16e
  26. Sep 11, 2016
    • Jeff Vander Stoep's avatar
      Enforce ioctl command whitelisting on all sockets · bff98015
      Jeff Vander Stoep authored
      Remove the ioctl permission for most socket types. For others, such as
      tcp/udp/rawip/unix_dgram/unix_stream set a default unprivileged whitelist
      that individual domains may extend (except where neverallowed like
      untrusted_app). Enforce via a neverallowxperm rule.
      
      Change-Id: I15548d830f8eff1fd4d64005c5769ca2be8d4ffe
      bff98015
  27. Aug 23, 2016
    • Nick Kralevich's avatar
      fix build: exclude bluetooth from neverallow restriction · 7e380216
      Nick Kralevich authored
      Bluetooth is sometimes started from init.
      
      Addresses the following compiler error:
      
        libsepol.report_failure: neverallow on line 489 of
        system/sepolicy/domain.te (or line 9149 of policy.conf) violated by
        allow init bluetooth:process { transition };
        libsepol.check_assertions: 1 neverallow failures occurred
        Error while expanding policy
      
      Change-Id: I2bc1e15217892e1ba2a62c9683af0f3c0aa16b86
      7e380216
  28. Aug 22, 2016
    • Eino-Ville Talvala's avatar
      Rework neverallow for /data execute permission · eedacf83
      Eino-Ville Talvala authored
      Previously appdomains allowed to execute off of /data
      where whitelisted. This had the unfortunate side effect of
      disallowing the creation of device specific app domains
      with fewer permissions than untrusted_app. Instead grant
      all apps a neverallow exemption and blacklist specific app
      domains that should still abide by the restriction.
      
      This allows devices to add new app domains that need
      /data execute permission without conflicting with this rule.
      
      Bug: 26906711
      
      (cherry picked from commit c5266df9)
      
      Change-Id: I4adb58e8c8b35122d6295db58cedaa355cdd3924
      eedacf83
  29. Jul 12, 2016
    • Andreas Gampe's avatar
      Sepolicy: allow otapreopt_chroot to mount vendor · ec4b9d67
      Andreas Gampe authored
      Vendor apps are usually not preopted, so A/B dexopt should pick
      them up. update_engine is not mounting the vendor partition, so
      let otapreopt_chroot do the work.
      
      This change gives otapreopt_chroot permission to mount /vendor
      into the chroot environment.
      
      Bug: 25612095
      Bug: 29498238
      Change-Id: I5a77bdb78a8e478ce10f6c1d0f911a8d6686becb
      ec4b9d67
  30. Jul 11, 2016
    • Andreas Gampe's avatar
      Sepolicy: Add otapreopt_slot · eb717421
      Andreas Gampe authored
      The new A/B OTA artifact naming scheme includes the target slot so
      that the system is robust with respect to unexpected reboots. This
      complicates the renaming code after reboot, so it is moved from the
      zygote into a simple script (otapreopt_slot) that is hooked into
      the startup sequence in init.
      
      Give the script the subset of the rights that the zygote had so that
      it can move the artifacts from /data/ota into /data/dalvik-cache.
      Relabeling will be done in the init rc component, so relabeling
      rights can be completely removed.
      
      Bug: 25612095
      Bug: 28069686
      Change-Id: Iad56dc3d78ac759f4f2cce65633cdaf1cab7631b
      eb717421
  31. Jun 28, 2016
    • Alex Light's avatar
      Allow cppreopts to work with selinux · d3edd6b5
      Alex Light authored
      Bug: 29278988
      Change-Id: I199572377a6b5c33116c718a545159ddcf50df30
      d3edd6b5
    • Jeff Vander Stoep's avatar
      domain: allow reading /proc/sys/vm/overcommit_memory · bc1986fb
      Jeff Vander Stoep authored
      Needed for jemalloc commit:
      
      2f970c32b527660a33fa513a76d913c812dcf7c
      Modify pages_map() to support mapping uncommitted virtual memory.
      
      avc: denied { read } for name="overcommit_memory" dev="proc" ino=10544
      scontext=u:r:wificond:s0 tcontext=u:object_r:proc:s0 tclass=file
      
      Bug: 29773242
      Change-Id: I78054c1ed576a7998c4ee1d1beca2f610c589c3a
      bc1986fb
  32. Jun 27, 2016
Loading