Skip to content
Snippets Groups Projects
  1. Nov 09, 2017
    • Jeff Vander Stoep's avatar
      Allow vendor apps to use surfaceflinger_service · 63f46773
      Jeff Vander Stoep authored
      Vendor apps may only use servicemanager provided services
      marked as app_api_service. surfaceflinger_service should be
      available to vendor apps, so add this attribute and clean up
      duplicate grants.
      
      Addresses:
      avc:  denied  { find } scontext=u:r:qtelephony:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      avc:  denied  { find } scontext=u:r:ssr_detector:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      avc:  denied  { find } scontext=u:r:qcneservice:s0
      tcontext=u:object_r:surfaceflinger_service:s0 tclass=service_manager
      
      Bug: 69064190
      Test: build
      Change-Id: I00fcf43b0a8bde232709aac1040a5d7f4792fa0f
      63f46773
  2. Nov 08, 2017
  3. Nov 07, 2017
  4. Nov 06, 2017
  5. Nov 03, 2017
    • Tri Vo's avatar
      radio: neverallow access to proc and sysfs types. · 5aac163b
      Tri Vo authored
      Bug: 65643247
      Test: build aosp_sailfish-userdebug
      Test: build walleye-userdebug from internal
      This CL does not change runtime behavior.
      Change-Id: I82c520579b986ea2a4a6f030ec60d5345c00b54f
      5aac163b
  6. Nov 02, 2017
    • Shubham Ajmera's avatar
      Don't allow dexoptanalyzer to open app_data_files · b8a42499
      Shubham Ajmera authored
      Test: manual(installd flow without sepolicy denials)
      Bug: 67111829
      Change-Id: I7ac1a86e731ec5900eec83608b4765a6818f2fd0
      b8a42499
    • Tri Vo's avatar
      Neverallow coredomain to kernel interface files. · 233c7a6b
      Tri Vo authored
      Core domains should not be allowed access to kernel interfaces,
      which are not explicitly labeled. These interfaces include
      (but are not limited to):
      
      1. /proc
      2. /sys
      3. /dev
      4. debugfs
      5. tracefs
      6. inotifyfs
      7. pstorefs
      8. configfs
      9. functionfs
      10. usbfs
      11. binfmt_miscfs
      
      We keep a lists of exceptions to the rule, which we will be gradually shrinking.
      This will help us prevent accidental regressions in our efforts to label
      kernel interfaces.
      
      Bug: 68159582
      Bug: 68792382
      Test: build aosp_sailfish-user
      Test: build aosp_sailfish-userdebug
      Test: CP to internal and build walleye-user
      Change-Id: I1b2890ce1efb02a08709a6132cf2f12f9d88fde7
      233c7a6b
    • Tobias Thierer's avatar
      Revert "Neverallow coredomain to kernel interface files." · 83a06805
      Tobias Thierer authored
      This reverts commit 502e43f7.
      
      Reason for revert: Suspected to have broken a build, see b/68792382
      
      Bug: 68792382
      Change-Id: Ib5d465b7a50a73e3d8d8edd4e6b3426a7bde4249
      83a06805
  7. Nov 01, 2017
  8. Oct 31, 2017
    • Tri Vo's avatar
      Neverallow coredomain to kernel interface files. · 502e43f7
      Tri Vo authored
      Core domains should not be allowed access to kernel interfaces,
      which are not explicitly labeled. These interfaces include
      (but are not limited to):
      
      1. /proc
      2. /sys
      3. /dev
      4. debugfs
      5. tracefs
      6. inotifyfs
      7. pstorefs
      8. configfs
      9. functionfs
      10. usbfs
      11. binfmt_miscfs
      
      We keep a lists of exceptions to the rule, which we will be gradually shrinking.
      This will help us prevent accidental regressions in our efforts to label
      kernel interfaces.
      
      Bug: 68159582
      Test: bullhead, sailfish can build
      Change-Id: I8e466843e1856720f30964546c5c2c32989fa3a5
      502e43f7
  9. Oct 25, 2017
    • Paul Crowley's avatar
      Move most of public/vold_prepare_subdirs.te to private · 5850a2ae
      Paul Crowley authored
      AIUI permissions should be in private unless they need to be public.
      
      Bug: 25861755
      Test: Boot device, create and remove a user, observe logs
      Change-Id: I6c3521d50dab2d508fce4b614d51e163e7c8f3da
      5850a2ae
    • Tom Cherry's avatar
      add vendor_init.te · 621c24cb
      Tom Cherry authored
      First pass at adding vendor_init.te
      
      Bug: 62875318
      Test: boot sailfish with vendor_init
      Change-Id: I35cc9be324075d8baae866d6de4166c37fddac68
      621c24cb
  10. Oct 24, 2017
    • Tom Cherry's avatar
      Add label for /proc/sys/vm/page-cluster · 8bdb1dab
      Tom Cherry authored
      Test: boot sailfish with no audit when writing to page-cluster
      Change-Id: I2bfebdf9342594d66d95daaec92d71195c93ffc8
      8bdb1dab
    • Tri Vo's avatar
      /proc, /sys access from uncrypt, update_engine, postinstall_dexopt · 04fb82f2
      Tri Vo authored
      New types:
      1. proc_random
      2. sysfs_dt_firmware_android
      
      Labeled:
      1. /proc/sys/kernel/random as proc_random.
      2. /sys/firmware/devicetree/base/firmware/android/{compatible, fstab,
      vbmeta} as sysfs_dt_firmware_android.
      
      Changed access:
      1. uncrypt, update_engine, postinstall_dexopt have access to generic proc
      and sysfs labels removed.
      2. appropriate permissions were added to uncrypt, update_engine,
      update_engine_common, postinstall_dexopt.
      
      Bug: 67416435
      Bug: 67416336
      Test: fake ota go/manual-ab-ota runs without denials
      Test: adb sideload runs without denials to new types
      Change-Id: Id31310ceb151a18652fcbb58037a0b90c1f6505a
      04fb82f2
  11. Oct 23, 2017
    • Max Bires's avatar
      Adding statscompanion_service and a dontaudit for find/add · 0187b231
      Max Bires authored
      Instead of removing the denial generating code, a dontaudit and a
      service label will be provided so that the team working on this new
      feature doesn't have to get slowed up with local revision patches.
      
      The dontaudit should be removed upon resolution of the linked bug.
      
      Bug: 67468181
      Test: statscompanion denials aren't audited
      Change-Id: Ib4554a7b6c714e7409ea504f5d0b82d5e1283cf7
      0187b231
    • Nick Kralevich's avatar
      Revert "Ensure only com.android.shell can run in the shell domain." · bf0c2a59
      Nick Kralevich authored
      The following error is occurring on master:
      
      10-23 16:24:24.785 shell  4884  4884 E SELinux : seapp_context_lookup:  No match for app with uid 2000, seinfo platform, name com.google.android.traceur
      10-23 16:24:24.785 shell  4884  4884 E SELinux : selinux_android_setcontext:  Error setting context for app with uid 2000, seinfo platform:targetSdkVersion=23:complete: Success
      10-23 16:24:24.785 shell  4884  4884 E Zygote  : selinux_android_setcontext(2000, 0, "platform:targetSdkVersion=23:complete", "com.google.android.traceur") failed
      10-23 16:24:24.785 shell  4884  4884 F zygote64: jni_internal.cc:593] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:648: selinux_android_setcontext failed
      10-23 16:24:24.818 shell  4884  4884 F zygote64: runtime.cc:535] Runtime aborting...
      
      Bug: 68126425
      Bug: 68032516
      
      This reverts commit 714ee5f2.
      
      Change-Id: I7356c4e4facb1e532bfdeb575acf2d83761a0852
      bf0c2a59
    • Jin Qian's avatar
      allow vold_prepare_subdirs to create storaged directories · c0125335
      Jin Qian authored
      Test: Boot device, observe logs
      Bug: 63740245
      Change-Id: I1068304b12ea90736b7927b7368ba1a213d2fbae
      c0125335
    • Jin Qian's avatar
      storaged: move storaged file from DE to CE · 81d8b0ee
      Jin Qian authored
      Allow vold/system_server to call storaged service
      
      Test: adb shell storaged -u
      Bug: 63740245
      Change-Id: I88219e32520006db20299468b7a8c7ce0bfa58e0
      Merged-In: I88219e32520006db20299468b7a8c7ce0bfa58e0
      (cherry picked from commit fa6c3d7c)
      81d8b0ee
  12. Oct 20, 2017
    • Tri Vo's avatar
      Restrict netd fwk policy. · 8dabc2ce
      Tri Vo authored
      Remove netd access to sysfs_type attribute.
      
      These were moved from vendor to fwk policy:
      1. sysfs_net type declaration
      2. labeling of /sys/devices/virtual/net with sysfs_net
      3. netd access to sysfs_net
      
      Bug: 65643247
      Test: can browse internet without netd denials
      Test: netd_unit_test, netd_integration_test without netd denials
      Merged-In: Ic1b95a098f438c4c6bc969bee801bf7dd1a13f6e
      Change-Id: Ic1b95a098f438c4c6bc969bee801bf7dd1a13f6e
      (cherry picked from commit e62a56b7)
      8dabc2ce
    • Jeff Vander Stoep's avatar
      priv_app: move logspam suppression to core policy · 6233848f
      Jeff Vander Stoep authored
      No sign of these denials getting cleaned up, so supress them in core
      policy.
      
      Test: build
      Change-Id: I0320425cb72cbd15cef0762090899491338d4f7c
      6233848f
    • Nick Kralevich's avatar
      Fixup neverallow rule · 2ec15e5b
      Nick Kralevich authored
      When we removed /data/dalvik-cache execute permission for system_server
      (b/37214733, b/31780877), I forgot to fixup this neverallow rule.
      Fix rule.
      
      Test: policy compiles.
      Change-Id: I38b821a662e0d8304b8390a69a6d9e923211c31e
      2ec15e5b
    • Nick Kralevich's avatar
      Ensure only com.android.shell can run in the shell domain. · 714ee5f2
      Nick Kralevich authored
      Don't allow apps to run with uid=shell or selinux domain=shell unless
      the package is com.android.shell.
      
      Add a neverallow assertion (compile time assertion + CTS test) to ensure
      no regressions.
      
      Bug: 68032516
      Test: policy compiles, device boots, and no obvious problems.
      Change-Id: Ic6600fa5608bfbdd41ff53840d904f97d17d6731
      714ee5f2
  13. Oct 19, 2017
  14. Oct 17, 2017
    • Steven Moreland's avatar
      sepolicy for lazy starting HIDL services · 13c39467
      Steven Moreland authored
      Now hwservicemanager can send ctl.interface_start messages
      to init.
      
      Note that 'set_prop(ctl.*, "foo")' maps to property context
      for ctl.foo.
      
      Bug: 64678982
      Test: hwservicemanager can start interfaces
      Change-Id: I9ab0bacd0c33edb0dcc4186fa0b7cc28fd8d2f30
      13c39467
    • Max Bires's avatar
      Allowing system_server to search sysfs_power dir · aed69d67
      Max Bires authored
      rw access to sysfs_power file is not enough; in some cases search access
      is also needed
      
      Bug: 67895406
      Test: system_server can access memory power statistics
      Change-Id: I471e8e60626e6eed35e74e25a0f4be470885a459
      aed69d67
    • Paul Crowley's avatar
      vold_prepare_subdirs sets policy in vold-created dirs. · 5b962cfd
      Paul Crowley authored
      Bug: 25861755
      Test: Boot device, observe logs
      Change-Id: I6c13430d42e9794003eb48e6ca219b874112b900
      Merged-In: I6c13430d42e9794003eb48e6ca219b874112b900
      (cherry picked from commit 47f3ed09)
      5b962cfd
  15. Oct 16, 2017
  16. Oct 14, 2017
    • Todd Poynor's avatar
      PowerUI access to thermalservice · bbc692c6
      Todd Poynor authored
      Allow PowerUI / platform_app to use thermalservice for receiving
      notifications of thermal events.
      
      Bug: 66698613
      Test: PowerNotificationWarningsTest, PowerUITest,
            manual: marlin and <redacted> with artificially low temperature
            threshold and logcat debugging messages
      Change-Id: I5428bd5f99424f83ef72d981afaf769bdcd03629
      Merged-In: I5428bd5f99424f83ef72d981afaf769bdcd03629
      bbc692c6
  17. Oct 13, 2017
  18. Oct 12, 2017
    • Tri Vo's avatar
      Label system_server's dependencies in sysfs. · 1960215c
      Tri Vo authored
      New types:
      sysfs_android_usb
      sysfs_ipv4
      sysfs_power
      sysfs_rtc
      sysfs_switch
      sysfs_wakeup_reasons
      
      Labeled:
      /sys/class/android_usb, /sys/devices/virtual/android_usb ->sysfs_android_usb
      /sys/class/rtc -> sysfs_rtc
      /sys/class/switch, /sys/devices/virtual/switch -> sysfs_switch
      /sys/power/state, /sys/power/wakeup_count -> sysfs_power
      /sys/kernel/ipv4 -> sysfs_ipv4
      /sys/kernel/wakeup_reasons -> sysfs_wakeup_reasons
      
      Removed access to sysfs and sysfs_type from system_server and added
      appropriate access to new types.
      
      Bug: 65643247
      Test: sailfish boots without violation from system_server or to new labels.
      Change-Id: I27250fd537d76c8226defa138d84fe2a4ce2d5d5
      1960215c
    • Jeff Vander Stoep's avatar
      Neverallow write access to /sys files for untrusted apps · 06cef4ff
      Jeff Vander Stoep authored
      Test: build aosp_sailfish
      Change-Id: Iaefe1df66885d3e78feb600c3d9845bd9fe671a2
      06cef4ff
  19. Oct 10, 2017
    • Tao Bao's avatar
      Create sysfs_dm label. · 5b4bea43
      Tao Bao authored
      Prior to this CL, /sys/devices/virtual/block/dm-X was using the generic
      sysfs label. This CL creates sysfs_dm label and grants the following
      accesses:
       - update_verifier to read sysfs_dm dir and file at
         /sys/devices/virtual/block/dm-X.
       - vold to write sysfs_dm.
      
      Bug: 63440407
      Test: update_verifier successfully triggers blocks verification and
            marks a sucessful boot;
      Test: No sysfs_dm related denials on sailfish.
      Change-Id: I6349412707800f1bd3a2fb94d4fe505558400c95
      5b4bea43
    • Nick Kralevich's avatar
      Ensure /sys restrictions for isolated_apps · 62d3b4f1
      Nick Kralevich authored
      isolated_apps are intended to be strictly limited in the /sys files
      which can be read. Add a neverallow assertion to guarantee this on all
      Android compatible devices.
      
      Test: policy compiles.
      Change-Id: I2980291dcf4e74bb12c81199d61c5eb8a182036c
      62d3b4f1
  20. Oct 09, 2017
  21. Oct 07, 2017
    • Nick Kralevich's avatar
      Revert "Ensure /sys restrictions for isolated_apps" · ae48ecbd
      Nick Kralevich authored
      Bullhead and dragon are broken. Revert until I can fix
      those builds.
      
      Dragon:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26264 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      
      Bullhead:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_power_management:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_thermal:file { ioctl read lock open }; 
      libsepol.check_assertions: 3 neverallow failures occurred 
      
      
      This reverts commit 579366a0.
      
      Change-Id: I1ea4824e226c06628769898299f2e322060d0d06
      Test: policy compiles.
      ae48ecbd
  22. Oct 06, 2017
    • Tri Vo's avatar
      Extend access to proc/asound/* · 464f59ae
      Tri Vo authored
      Renamed this type:
      proc_asound_cards -> proc_asound
      
      Labeled /proc/asound/devices as proc_asound.
      
      We now use proc_asound type to label files under /proc/asound which we
      want to expose to system components.
      
      Bug: 66988327
      Test: Pixel 2 boots, can play sound with or without headphones, and
      selinux denials to proc_asound are not seen.
      
      Change-Id: I453d9bfdd70eb80931ec9e80f17c8fd0629db3d0
      464f59ae
  23. Oct 05, 2017
    • Nick Kralevich's avatar
      Ensure /sys restrictions for isolated_apps · 579366a0
      Nick Kralevich authored
      isolated_apps are intended to be strictly limited in the /sys files
      which can be read. Add a neverallow assertion to guarantee this on all
      Android compatible devices.
      
      Test: policy compiles.
      Change-Id: I47aceefa3f43a7ea9e526f6f0ef377d0b4efbe3a
      579366a0
  24. Oct 04, 2017
Loading