Skip to content
Snippets Groups Projects
  1. Sep 10, 2013
    • Alex Klyubin's avatar
      Permit writing to /dev/random and /dev/urandom. · a2477056
      Alex Klyubin authored
      Apps attempting to write to /dev/random or /dev/urandom currently
      succeed, but a policy violation is logged. These two Linux RNG
      devices are meant to be written to by arbitrary apps. Thus, there's
      no reason to deny this capability.
      
      Bug: 10679705
      
      Change-Id: Ife401f1dd2182889471eef7e90fcc92e96f9c4d6
      a2477056
  2. Aug 30, 2013
  3. Jul 16, 2013
  4. Jul 15, 2013
  5. Jul 14, 2013
    • Nick Kralevich's avatar
      untrusted_app.te / isolated_app.te / app.te first pass · 6634a108
      Nick Kralevich authored
      This is my first attempt at creating an enforcing SELinux domain for
      apps, untrusted_apps, and isolated_apps. Much of these rules are based on the
      contents of app.te as of commit 11153ef3
      with extensive modifications, some of which are included below.
      
      * Allow communication with netd/dnsproxyd, to allow netd to handle
        dns requests
      * Allow binder communications with the DNS server
      * Allow binder communications with surfaceflinger
      * Allow an app to bind to tcp/udp ports
      * Allow all domains to read files from the root partition, assuming
        the DAC allows access.
      
      In addition, I added a bunch of "neverallow" rules, to assert that
      certain capabilities are never added.
      
      This change has a high probability of breaking someone, somewhere.
      If it does, then I'm happy to fix the breakage, rollback this change,
      or put untrusted_app into permissive mode.
      
      Change-Id: I83f220135d20ab4f70fbd7be9401b5b1def1fe35
      6634a108
  6. Jul 13, 2013
    • Nick Kralevich's avatar
      remove "self:process ptrace" from domain, netd neverallow rules · 9a19885c
      Nick Kralevich authored
      Remove "self:process ptrace" from all SELinux enforced domains.
      In general, a process should never need to ptrace itself.
      We can add this back to more narrowly scoped domains as needed.
      
      Add a bunch of neverallow assertions to netd.te, to verify that netd
      never gets unexpected capabilities.
      
      Change-Id: Ie862dc95bec84068536bb64705667e36210c5f4e
      9a19885c
  7. Jul 11, 2013
    • Nick Kralevich's avatar
      domain.te: allow access to /sys/kernel/debug/tracing/trace_marker · 8758cc5f
      Nick Kralevich authored
      Bug: 9781325
      Change-Id: Ib6f6875f690420b59fceb0a32590a2b9ed8dda95
      8758cc5f
    • Nick Kralevich's avatar
      domain.te: Add backwards compatibility for unlabeled files · 0c9708b2
      Nick Kralevich authored
      For unlabeled files, revert to DAC rules. This is for backwards
      compatibility, as files created before SELinux was in place may
      not be properly labeled.
      
      Over time, the number of unlabeled files will decrease, and we can
      (hopefully) remove this rule in the future.
      
      To prevent inadvertantly introducing the "relabelto" permission, add
      a neverallow domain, and add apps which have a legitimate need to
      relabel to this domain.
      
      Bug: 9777552
      Change-Id: I71b0ff8abd4925432062007c45b5be85f6f70a88
      0c9708b2
  8. Jun 28, 2013
    • Nick Kralevich's avatar
      Enable SELinux protections for netd. · dbd28d91
      Nick Kralevich authored
      This change does several things:
      
      1) Restore domain.te to the version present at
      cd516a32 . This is the version
      currently being distributed in AOSP.
      
      2) Add "allow domain properties_device:file r_file_perms;" to
      domain.te, to allow all domains to read /dev/__properties__ .
      This change was missing from AOSP.
      
      3) Restore netd.te to the version present at
      80c9ba52 . This is the version
      currently being distributed in AOSP.
      
      4) Remove anything involving module loading from netd.te. CTS
      enforces that Android kernels can't have module loading enabled.
      
      5) Add several new capabilities, plus data file rules, to
      netd.te, since netd needs to write to files owned by wifi.
      
      6) Add a new unconfined domain called dnsmasq.te, and allow
      transitions from netd to that domain. Over time, we'll tighten up
      the dnsmasq.te domain.
      
      7) Add a new unconfined domain called hostapd.te, and allow
      transitions from netd to that domain. Over time, we'll tighten up
      the hostapd.te domain.
      
      The net effect of these changes is to re-enable SELinux protections
      for netd. The policy is FAR from perfect, and allows a lot of wiggle
      room, but we can improve it over time.
      
      Testing: as much as possible, I've exercised networking related
      functionality, including turning on and off wifi, entering airplane
      mode, and enabling tethering and portable wifi hotspots. It's quite
      possible I've missed something, and if we experience problems, I
      can roll back this change.
      
      Bug: 9618347
      Change-Id: I23ff3eebcef629bc7baabcf6962f25f116c4a3c0
      dbd28d91
  9. May 20, 2013
    • repo sync's avatar
      Make all domains unconfined. · 77d4731e
      repo sync authored
      This prevents denials from being generated by the base policy.
      Over time, these rules will be incrementally tightened to improve
      security.
      
      Change-Id: I4be1c987a5d69ac784a56d42fc2c9063c402de11
      77d4731e
  10. Apr 05, 2013
    • Stephen Smalley's avatar
      run-as policy fixes. · 74ba8c86
      Stephen Smalley authored
      - Remove dac_read_search as it is no longer required by run-as.
      - Introduce a separate type for /dev/tty so that we can allow use of own tty for
      for a run-as shell without allowing access to other /dev/tty[0-9]* nodes.
      - Allow sigchld notifications for death of run-as and its descendants by adbd.
      - Drop redundant rules for executing shell or system commands from untrusted_app;
      now covered by rules in app.te.
      
      Change-Id: Ic3bf7bee9eeabf9ad4a20f61fbb142a64bb37c6c
      74ba8c86
    • Stephen Smalley's avatar
      Allow all domains to read /dev symlinks. · 0e856a02
      Stephen Smalley authored
      
      Change-Id: I448a5553937a98775178b94f289ccb45ae862876
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      0e856a02
    • Stephen Smalley's avatar
      Allow all domains to read the log devices. · 81fe5f7c
      Stephen Smalley authored
      
      Read access to /dev/log/* is no longer restricted.
      Filtering on reads is performed per-uid by the kernel logger driver.
      
      Change-Id: Ia986cbe66b84f3898e858c60f12c7f3d63ac47cf
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      81fe5f7c
    • Stephen Smalley's avatar
      run-as policy fixes. · cd516a32
      Stephen Smalley authored
      - Remove dac_read_search as it is no longer required by run-as.
      - Introduce a separate type for /dev/tty so that we can allow use of own tty for
      for a run-as shell without allowing access to other /dev/tty[0-9]* nodes.
      - Allow sigchld notifications for death of run-as and its descendants by adbd.
      - Drop redundant rules for executing shell or system commands from untrusted_app;
      now covered by rules in app.te.
      
      Change-Id: Ic3bf7bee9eeabf9ad4a20f61fbb142a64bb37c6c
      cd516a32
  11. Apr 04, 2013
  12. Mar 29, 2013
  13. Mar 27, 2013
  14. Mar 22, 2013
  15. Mar 19, 2013
  16. Jan 30, 2013
  17. Oct 22, 2012
  18. Sep 13, 2012
  19. Aug 09, 2012
  20. Jul 30, 2012
  21. Mar 07, 2012
  22. Jan 04, 2012
Loading