Skip to content
Snippets Groups Projects
  1. Dec 05, 2016
    • 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
  2. Dec 04, 2016
  3. Dec 03, 2016
    • Ray Essick's avatar
      Allow access to mediaanalytics service · 090f4a4d
      Ray Essick authored
      media framework analytics are gathered in a separate service.
      define a context for this new service, allow various
      media-related services and libraries to access this new service.
      
      Bug: 30267133
      Test: ran media CTS, watched for selinux denials.
      Change-Id: I5aa5aaa5aa9e82465b8024f87ed32d6ba4db35ca
      090f4a4d
  4. Dec 02, 2016
    • Jeff Sharkey's avatar
      Allow system_server to measure emulated stats. · 17c675b3
      Jeff Sharkey authored
      Historically we pushed all system_server SD card interactions through
      DefaultContainerService to avoid holding open FDs, but it's safe to
      measure disk usage for internal emulated storage when looking
      directly at /data/media, since there is no risk of unsafe ejection.
      
      These rule changes give us just enough access to measure statistics.
      
      avc: denied { getattr } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
      avc: denied { open } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
      avc: denied { read } for name="0" dev="sda35" ino=589827 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      
      Test: builds, boots, and access allowed
      Bug: 33298975
      Change-Id: I9748608a5c1169d542e763c5a8f79c4f26f7a382
      17c675b3
  5. Dec 01, 2016
  6. Nov 30, 2016
    • Nick Kralevich's avatar
      domain_deprecated.te: remove /proc/net access · dd649da8
      Nick Kralevich authored
      Remove /proc/net access to domain_deprecated. Add it to domains where it
      was missing before.
      
      Other than these domains, SELinux denial monitoring hasn't picked up any
      denials related to /proc/net
      
      Bug: 28760354
      Test: Device boots
      Test: No unexpected denials in denial collection logs.
      Change-Id: Ie5bfa4bc0070793c1e8bf3b00676fd31c08d426a
      dd649da8
    • Max's avatar
      Added an auditallow rule to track vold remounting filesystems. · 314d8c58
      Max authored
      Vold shouldn't have this selinux permission, so this will be left in for
      a few weeks to keep track of if removing it would be an issue to any
      other processes. If not, then a follow-up CL will remove both the rule
      and the auditallow
      
      Test: This CL is a test in itself, auditallow rules shouldn't change
      behavior of SELinux policy by themselves
      Bug: 26901147
      Change-Id: Ib076448863bd54278df59a3b514c9e877eb22ee5
      314d8c58
  7. Nov 29, 2016
  8. Nov 28, 2016
  9. Nov 27, 2016
  10. Nov 26, 2016
  11. Nov 23, 2016
  12. Nov 22, 2016
    • Treehugger Robot's avatar
    • Tao Bao's avatar
      recovery.te: Allow writing to sysfs_devices_system_cpu. · ee7960c0
      Tao Bao authored
      recovery (update_binary) may need to set up cpufreq during an update.
      
      avc:  denied  { write } for  pid=335 comm="update_binary" name="scaling_max_freq" dev="sysfs" ino=7410 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file permissive=0
      
      Bug: 32463933
      Test: Build a recovery image and apply an OTA package that writes to
            /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq.
      
      Change-Id: Ia90af9dd15e162dd94bcd4722b66aa296e3058c5
      ee7960c0
    • Nick Kralevich's avatar
      neverallow some /proc file reads · 0b7506ff
      Nick Kralevich authored
      Lock in the gains we've made so far in restricting access to generically
      labeled /proc files. There's more we can do here, but let's avoid
      inadvertent regressions.
      
      Test: policy compiles. Only compile time assertions added.
      Bug: 26813932
      Change-Id: If354c2ddc1c59beed7f0eb4bcbd3f0d9971c3b8a
      0b7506ff
    • Nick Kralevich's avatar
      label /bugreports · d314376d
      Nick Kralevich authored
      /data/bugreports is moving to /bugreports
      
      Bug: 27262109
      Bug: 27204904
      Bug: 32799236
      Test: new symlink is in /bugreports and is labeled correctly
      Change-Id: Ib6a492fba8388bf43debad28cfc851679f8c6151
      d314376d
  13. Nov 21, 2016
    • Nick Kralevich's avatar
      access_vectors: Remove unused permission definitions · 11dc03e5
      Nick Kralevich authored
      Description stolen from
      https://github.com/torvalds/linux/commit/42a9699a9fa179c0054ea3cf5ad3cc67104a6162
      
      Remove unused permission definitions from SELinux.
      Many of these were only ever used in pre-mainline
      versions of SELinux, prior to Linux 2.6.0.  Some of them
      were used in the legacy network or compat_net=1 checks
      that were disabled by default in Linux 2.6.18 and
      fully removed in Linux 2.6.30.
      
      Permissions never used in mainline Linux:
      file swapon
      filesystem transition
      tcp_socket { connectto newconn acceptfrom }
      node enforce_dest
      unix_stream_socket { newconn acceptfrom }
      
      Legacy network checks, removed in 2.6.30:
      socket { recv_msg send_msg }
      node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
      netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
      
      Test: policy compiles and no boot errors (marlin)
      Change-Id: Idaef2567666f80db39c3e3cee70e760e1dac73ec
      11dc03e5
    • Treehugger Robot's avatar
    • Connor O'Brien's avatar
      Add permissions for hal_boot · 12443b7a
      Connor O'Brien authored
      
      The service running the boot control HAL needs the permissions
      provided by the boot_control_hal attribute. update_engine and
      update_verifier still also need these permissions in order
      to successfully call the new HAL in pass-through mode, but also
      need permission to call the new service.
      
      Bug: 31864052
      Test: Built and confirmed no permission denials.
      Change-Id: I2a6fdd5cf79b9e461d7cc14bd5b7abd6481ed911
      Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
      12443b7a
    • Jorge Lucangeli Obes's avatar
      Add WITH_DEXPREOPT_PIC to 'with_dexpreopt' SELinux macro. · 28994347
      Jorge Lucangeli Obes authored
      |WITH_DEXPREOPT_PIC = false| will still cause code to be loaded from
      /data.
      
      Bug: 32970029
      Test: On HiKey and Marlin:
      Test: Add |WITH_DEXPREOPT_PIC = false|, see SELinux denial.
      Test: Apply this CL, no SELinux denials.
      Change-Id: I0a1d39eeb4d7f75d84c1908b879d9ea1ccffba74
      28994347
    • 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
  14. Nov 20, 2016
    • Nick Kralevich's avatar
      domain_deprecated.te: delete stale permissions · f2de0752
      Nick Kralevich authored
      auditallows have been in place for quite a while now, and nothing has
      triggered. Let's do some cleanup!
      
      Bug: 28760354
      Test: device boots and no new denials
      Test: SELinux denials collection has seen no instances of these
            permissions
      Change-Id: I9293f8d8756c9db6307e344c32cd11b9e0183e7f
      f2de0752
    • 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
  15. Nov 18, 2016
Loading