Skip to content
Snippets Groups Projects
  1. Dec 13, 2017
    • Tom Cherry's avatar
      Add /dev/__properties__/property_info · 8b5433a9
      Tom Cherry authored
      Allow init to create a serialized property_info file and allow all
      processes to read it.
      
      Bug: 36001741
      Test: boot bullhead, walleye using property_info
      
      Change-Id: Ie51d4c0f0221b128dd087029c811fda15b4d7093
      8b5433a9
  2. Dec 12, 2017
    • Bowgo Tsai's avatar
      Switch file context of odm(/.*) to vendor_file · e9ae7735
      Bowgo Tsai authored
      /odm partition is the extension of /vendor partition, so we should not
      use system_file for it. Currently there is no ABI between vendor and
      odm. We can use 'odm_file' when needed in the future.
      
      Bug: 64240127
      Test: boot a device
      Change-Id: I4e8300d597aeeba60a255c8d114a54b24bc39470
      e9ae7735
  3. Dec 11, 2017
    • Tri Vo's avatar
      Remove access to 'sysfs' files from healtd and charger. · d276b434
      Tri Vo authored
      We rely on vendors to label all dependencies of healthd/charger under
      /sys/class/power_supply with sysfs_batteryinfo type.
      
      Bug: 65643247
      Bug: 32659667
      Test: boots without denials from healthd, to sysfs_batteryinfo or to
      sysfs_msm_subsys.
      Test: charging with device turned off works without /sys denials.
      
      Change-Id: I893f309ecad8a0caf7d0b81f5f945725907255c2
      d276b434
  4. Dec 09, 2017
    • Tri Vo's avatar
      Label /sys/class/net as sysfs_net. · c135f0ac
      Tri Vo authored
      We already expect contents of /sys/class/net to be labeled as sysfs_net.
      Also label the directory for consistensy since we usually label
      /sys/class/foo directories as sysfs_foo.
      
      Bug: 65643247
      Test: netd_integration_test
      Test: can browse internet without denials to sysfs_net
      Change-Id: I9d28ab4baf71df99ae966276532f14684d1abca6
      c135f0ac
  5. Dec 08, 2017
  6. Dec 07, 2017
    • Tomasz Wasilczyk's avatar
      Add broadcast radio HAL 2.0 default implementation to the sepolicy. · 4f7bb757
      Tomasz Wasilczyk authored
      Test: VTS
      Bug: 69958777
      Change-Id: I6db7dd9afc9c7f254a0233ff3144b02e48727038
      4f7bb757
    • Elliott Hughes's avatar
      Add a /bin symlink for convenience. · 2b42fe4b
      Elliott Hughes authored
      Bug: http://b/63142920
      Test: `make dist`
      Change-Id: Iae363fd5e7181941408d3d75cbf248e651bc8b49
      2b42fe4b
    • Dan Cashman's avatar
      Commit 27.0 compat mapping file to master. · f26e3972
      Dan Cashman authored
      Bug: 65551293
      Bug: 69390067
      Test: None. Prebuilt only change.
      Change-Id: Ie793eb4a35927cb494281df59ae0a63666bb6e76
      f26e3972
    • Bo Hu's avatar
      Revert "Renames nonplat_* to vendor_*" · 283dd9eb
      Bo Hu authored
      This reverts commit 8b562206.
      
      Reason for revert: broke mac build
      
      b/70273082
      
      FAILED: out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil
      /bin/bash -c "(out/host/darwin-x86/bin/version_policy -b out/target/product/generic_x86/obj/FAKE/selinux_policy_intermediates/plat_pub_policy.cil -t out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy_raw.cil -n 10000.0 -o out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil.tmp ) && (grep -Fxv -f out/target/product/generic_x86/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil.tmp > out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil ) && (out/host/darwin-x86/bin/secilc -m -M true -G -N -c 30 		out/target/product/generic_x86/obj/ETC/plat_sepolicy.cil_intermediates/plat_sepolicy.cil out/target/product/generic_x86/obj/ETC/plat_pub_versioned.cil_intermediates/plat_pub_versioned.cil out/target/product/generic_x86/obj/ETC/10000.0.cil_intermediates/10000.0.cil out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_sepolicy.cil -o /dev/null -f /dev/null )"
      Parsing out/target/product/generic_x86/obj/FAKE/selinux_policy_intermediates/plat_pub_policy.cil
      Parsing out/target/product/generic_x86/obj/ETC/vendor_sepolicy.cil_intermediates/vendor_policy_raw.cil
      grep: out of memory
      
      Change-Id: I14f0801fdd6b9be28e53dfcc0f352b844005db59
      283dd9eb
  7. Dec 06, 2017
    • Andreas Gampe's avatar
      Sepolicy: Label kernel notes · 9213fe02
      Andreas Gampe authored
      Label /sys/kernel/notes.
      
      Bug: 70275668
      Test: m
      Change-Id: Ieb666425d2db13f85225fb902fe06b0bf2335bef
      9213fe02
    • Tri Vo's avatar
      init: remove open, read, write access to 'sysfs' type. · 0e3235f4
      Tri Vo authored
      Add write access to:
      sysfs_android_usb
      sysfs_leds
      sysfs_power
      sysfs_zram
      
      Add setattr access to:
      sysfs_android_usb
      sysfs_devices_system_cpu
      sysfs_lowmemorykiller
      sysfs_power
      sysfs_leds
      sysfs_ipv4
      
      Bug: 70040773
      Bug: 65643247
      Change-Id: I68e2e796f5599c9d281897759c8d8eef9363559a
      Test: walleye boots with no denials from init to sysfs.
      0e3235f4
    • kaichieh's avatar
      Renames nonplat_* to vendor_* · 8b562206
      kaichieh authored
      This change renames the non-platform sepolicy files on a DUT from
      nonplat_* to vendor_*.
      
      It also splits the versioned platform sepolicy from vendor_sepolicy.cil
      to a new file /vendor/etc/selinux/plat_pub_versioned.cil. And only keeps
      vendor customizations in vendor_sepolicy.cil.
      
      Build variable BOARD_SEPOLICY_DIRS is also renamed to
      BOARD_VENDOR_SEPOLICY_DIRS.
      
      Bug: 64240127
      Test: boot an existing device
      Change-Id: I53a9715b2f9ddccd214f4cf9ef081ac426721612
      8b562206
  8. Dec 05, 2017
  9. Dec 02, 2017
    • Andreas Gampe's avatar
      Sepolicy: Fix perfprofd path · 99e4f402
      Andreas Gampe authored
      Corresponds to commit 410cdebaf966746d6667d6d0dd4cee62262905e1 in
      system/extras.
      
      Bug: 32286026
      Test: m
      Change-Id: I1e0934aa5bf4649d598ec460128de6f02711597f
      99e4f402
  10. Dec 01, 2017
  11. Nov 30, 2017
  12. Nov 29, 2017
    • Jeff Vander Stoep's avatar
      Fix bug map entry · 53950b65
      Jeff Vander Stoep authored
      Tclass was omitted for two entries.
      
      Bug: 69928154
      Bug: 69366875
      Test: build
      Change-Id: Ie12c240b84e365110516bcd786b98dc37295fdb9
      53950b65
    • Connor O'Brien's avatar
      selinux: set proc_uid_time_in_state type for /proc/uid · ac3c61eb
      Connor O'Brien authored
      
      /proc/uid/ provides the same per-uid time_in_state data as
      /proc/uid_time_in_state, so apply the same type and let system_server
      read directories of this type.
      
      Bug: 66953705
      Test: system_server can read /proc/uid/*/time_in_state files without
      denials on sailfish
      Change-Id: Iab7fd018c5296e8c0140be81c14e5bae9e0acb0b
      Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
      ac3c61eb
  13. Nov 28, 2017
    • Calin Juravle's avatar
      Allow system server to open profiles · 15da30b6
      Calin Juravle authored
      Allow system_server to open profile snapshots for read.
      System server never reads the actual content. It passes the descriptor to
      to privileged apps which acquire the permissions to inspect the profiles.
      
      Test: installd_dexopt_test
      Bug: 30934496
      Change-Id: I1d1f07a05261af25f6640040af1500c9a4d5b8d5
      15da30b6
    • Tri Vo's avatar
      Label /proc/sys/kernel/pid_max as proc_pid_max. · 4081fd39
      Tri Vo authored
      And give shell domain read access to /proc/sys/kernel/pic_max.
      
      Bug: 69569397
      Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
      --gtest_filter=pthread.pthread_mutex_owner_tid_limit
      Change-Id: Ib56c18ed553ad2c2113e6913788a4c00965483cc
      4081fd39
  14. Nov 22, 2017
    • Nick Kralevich's avatar
      Continuation of 9b2e0cbe · df642bef
      Nick Kralevich authored
      9b2e0cbe changed all uses of capability
      to global_capability_class_set but accidentally omitted one entry.
      Fix the one entry.
      
      Test: policy compiles.
      Change-Id: I1bb8c494a2660d9f02783c93b07d4238a2575106
      df642bef
    • Jiyong Park's avatar
      Label /vendor/priv-app as vendor_app_file · 76311578
      Jiyong Park authored
      In P, we will be supporting privileged apps in vendor partition, thus
      need to label /vendor/priv-app as vendor_app_file so that apps can exist
      under the dir.
      
      Bug: 35301609
      Test: N/A since there is no /vendor/priv-app yet. Framework change
      which is currently in the internal is required.
      
      Change-Id: I86a765ef9da5267113e64a7cbb38ba0abf5c2835
      76311578
  15. Nov 21, 2017
    • Benjamin Gordon's avatar
      sepolicy: Add rules for non-init namespaces · 9b2e0cbe
      Benjamin Gordon authored
      In kernel 4.7, the capability and capability2 classes were split apart
      from cap_userns and cap2_userns (see kernel commit
      8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
      run in a container with SELinux in enforcing mode.
      
      This change applies the existing capability rules to user namespaces as
      well as the root namespace so that Android running in a container
      behaves the same on pre- and post-4.7 kernels.
      
      This is essentially:
        1. New global_capability_class_set and global_capability2_class_set
           that match capability+cap_userns and capability2+cap2_userns,
           respectively.
        2. s/self:capability/self:global_capability_class_set/g
        3. s/self:capability2/self:global_capability2_class_set/g
        4. Add cap_userns and cap2_userns to the existing capability_class_set
           so that it covers all capabilities.  This set was used by several
           neverallow and dontaudit rules, and I confirmed that the new
           classes are still appropriate.
      
      Test: diff new policy against old and confirm that all new rules add
            only cap_userns or cap2_userns;
            Boot ARC++ on a device with the 4.12 kernel.
      Bug: crbug.com/754831
      
      Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
      9b2e0cbe
    • Jeff Vander Stoep's avatar
      Remove tracking bugs that have been resolved · 378763f2
      Jeff Vander Stoep authored
      Bug: 69175449
      Bug: 69197466
      Test: build
      Change-Id: I11e46b65449cb6f451ecab8d4dff9adc162fe115
      378763f2
  16. Nov 20, 2017
  17. Nov 17, 2017
    • Jeff Vander Stoep's avatar
      Allow AOSP processes to read pm_prop · 0f5ad4e5
      Jeff Vander Stoep authored
      Exclude vendor processes.
      
      Bug: 69309298
      Test: cts-tradefed run cts -m CtsCompilationTestCases
          completed in 33s. 5 passed, 0 failed
      Test: runtest frameworks-services -c \
          com.android.server.pm.dex.DexoptOptionsTests \
          --install=".*FrameworksServicesTests.apk"
          OK (5 tests)
      
      Change-Id: Ic02caf373e2214b4b931a724ca8d4f4effbc0741
      0f5ad4e5
    • Tri Vo's avatar
      shell: neverallow access to 'proc' label. · c4ef3630
      Tri Vo authored
      Added access to proc_uptime and proc_asound to address these denials:
      
      avc: denied { read } for name="uptime" dev="proc" ino=4026532080
      scontext=u:r:shell:s0 tcontext=u:object_r:proc_uptime:s0 tclass=file
      permissive=1
      
      avc: denied { getattr } for path="/proc/asound/version" dev="proc"
      ino=4026532017 scontext=u:r:shell:s0 tcontext=u:object_r:proc_asound:s0
      tclass=file permissive=1
      
      Bug: 65643247
      Test: device boots with no denial from 'shell' domain.
      Test: lsmod, ps, top, netstat
      Test: No denials triggered from CtsSecurityHostTestCases
      Test: external/toybox/run-tests-on-android.sh does not pass, but triggers
      no denials from 'shell' domain to 'proc' type.
      
      Change-Id: Ia4c26fd616e33e5962c6707a855dc24e338ec153
      c4ef3630
    • Vishnu Nair's avatar
      Add window trace files SELinux policy rules · 2d6942d3
      Vishnu Nair authored
      - Allow system_server to create and write to /data/misc/wmtrace/*
      - Allow surfaceflinger to create and write files from /data/misc/wmtrace/*
      - Allow dumpstate to read files from /data/misc/wmtrace/*
      permissions are restricted to userdebug or eng builds
      
      Bug: 64831661
      
      Test: adb shell cmd window tracing start && adb shell cmd window tracing stop
      Test: adb shell su root service call SurfaceFlinger 1025 i32 1 >/dev/null && adb shell su root service call SurfaceFlinger 1025 i32 0 >/dev/null
      Test: adb bugreport ~/tmp.zip && adb shell su root dmesg | grep 'avc: '
      
      Change-Id: I0b15166560739d73d7749201f3ad197dbcf5791c
      2d6942d3
    • Tri Vo's avatar
      mediaserver: remove access to 'sysfs' type. · 2ea12cd3
      Tri Vo authored
      Bug: 65643247
      Test: cts-tradefed run cts-dev -m \
      CtsMediaTestCases --compatibility:module-arg \
      CtsMediaTestCases:include-annotation:\
      android.platform.test.annotations.RequiresDevice
      No denials from mediaserver domain to sysfs type are observed.
      Change-Id: Icb5c12f04af213452d82e226993fe13085c5c33f
      2ea12cd3
  18. Nov 16, 2017
    • Tri Vo's avatar
      system_server: access to /proc/sys/fs/pipe-max-size · e7f4934d
      Tri Vo authored
      Label /proc/sys/fs/pipe-max-size with new type proc_pipe_conf and give
      system_server access to it.
      
      Addresses this denial:
      avc: denied { read } for name="pipe-max-size" dev="proc" ino=93817
      scontext=u:r:system_server:s0 tcontext=u:object_r:proc:s0 tclass=file
      permissive=0
      
      Bug: 69175449
      Bug: 69324398
      Test: sailfish boots
      Test: adb bugreport
      Test: craft an unresponsive app, trigger ANR, make sure traces are dumped
      into /data/anr
      Above denial from system_server not observed, no denials to proc_pipe_conf
      observed.
      Change-Id: I7c71f05820a4945ba982e29f76e9d9f4458b2b59
      e7f4934d
    • Calin Juravle's avatar
      Revert "Revert "Put pm.* property in new pm_prop context"" · 5316548f
      Calin Juravle authored
      This reverts commit 248b6dc6.
      
      Reason for revert: The dashboard complains that devices don't boot after this revert.
      
      Change-Id: I6a4648b64b096cbaa97c67aae6bc38b76d54cb48
      5316548f
  19. Nov 15, 2017
    • Tom Cherry's avatar
      Copy a dontaudit from init to vendor_init · 63492cd6
      Tom Cherry authored
      Copy init's dontaudit for sysfs:dir write; to calm the below denials:
      
      avc:  denied  { write } for  pid=542 comm="init" name="1da4000.ufshc" dev="sysfs" ino=21752 scontext=u:r:vendor_init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
      avc: denied { write } for pid=542 comm="init" name="1da4000.ufshc" dev="sysfs" ino=21752 scontext=u:r:vendor_init:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1
      
      Bug: 62875318
      Test: use pixel + factory reset + vendor_init
      Change-Id: I686b51c4f340b3565ea24f00516ebde846be7a89
      63492cd6
    • Calin Juravle's avatar
      Revert "Put pm.* property in new pm_prop context" · 248b6dc6
      Calin Juravle authored
      This reverts commit d1cf3a40.
      
      Reason for revert: It breaks CTS b/69309298 and other platform tests which read pm.dexopt properties.
      
      Change-Id: I5c7cde041113e9c19bb23218edd99f699fcf4a06
      248b6dc6
    • Tri Vo's avatar
      update_verifier: neverallow access to 'sysfs' label. · 7dd4d906
      Tri Vo authored
      Bug: 65643247
      Test: aosp_walleye-userdebug builds
      Test: aosp_sailfish-userdebug builds
      Change-Id: Iaebd368b84259783fbdc4778988bdb7ba0df300b
      7dd4d906
  20. Nov 14, 2017
    • Jeff Vander Stoep's avatar
      Add tracking bugs to crash_dump denials · 41401f47
      Jeff Vander Stoep authored
      avc: denied { search } for name="com.sf.activity" dev="sda35"
      ino=1444147 scontext=u:r:crash_dump:s0:c512,c768
      tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir
      avc: denied { search } for comm="crash_dump64"
      name="com.android.bluetooth" dev="sda13" ino=1442292
      scontext=u:r:crash_dump:s0 tcontext=u:object_r:bluetooth_data_file:s0
      tclass=dir
      avc: denied { search } for comm="crash_dump64" name="overlay" dev="dm-1"
      ino=938 scontext=u:r:crash_dump:s0
      tcontext=u:object_r:vendor_overlay_file:s0 tclass=dir permissive=0
      
      Bug: 68705274
      Bug: 68319037
      Test: build
      Change-Id: I44075ac6bf6447d863373c97ba10eadf59d2d22f
      41401f47
  21. Nov 13, 2017
    • Chad Brubaker's avatar
      Allow Instant/V2 apps to load code from /data/data · 7650669f
      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
      
      (cherrypicked from commit fe836817)
      
      Change-Id: I3abf3ade64aaf689039a515de642759dd39ae6f7
      7650669f
Loading