Skip to content
Snippets Groups Projects
  1. Nov 13, 2017
    • Jeff Vander Stoep's avatar
      Add tracking bugs to denials · 29666d12
      Jeff Vander Stoep authored
      These denials should not be allowed. Adding a bug number to the
      denial properly attributes them to a bug.
      
      Bug: 69197466
      avc: denied { fsetid } for comm="update_engine" capability=4
      scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability
      
      Bug: 62140539
      avc: denied { open }
      path="/data/system_de/0/spblob/17a358cf8dff62ea.weaver"
      scontext=u:r:vold:s0 tcontext=u:object_r:system_data_file:s0
      tclass=file
      avc: denied { unlink } for name="17a358cf8dff62ea.weaver"
      scontext=u:r:vold:s0 tcontext=u:object_r:system_data_file:s0
      tclass=file
      
      Bug: 69175449
      avc: denied { read } for name="pipe-max-size" dev="proc"
      scontext=u:r:system_server:s0 tcontext=u:object_r:proc:s0 tclass=file
      
      Test: build
      Change-Id: I62dc26a9076ab90ea4d4ce1f22e9b195f33ade16
      29666d12
  2. Nov 09, 2017
    • Hakan Kvist's avatar
      Allow update_engine to access /data/misc/update_engine_log · 6fe014f8
      Hakan Kvist authored
      Add label update_engine_log_data_file for log files created by
      update engine in directory /data/misc/update_engine_log.
      
      Bug: 65568605
      Test: manual
      Change-Id: I379db82a0ea540e41cb3b8e03f93d9ce64fac7c9
      6fe014f8
    • Jeff Vander Stoep's avatar
      Suppress mediaprover access to certain cache dirs · 182dbeb6
      Jeff Vander Stoep authored
      avc: denied { getattr } for comm="sAsyncHandlerTh"
      path="/data/cache/recovery" dev="sda13" ino=7086082
      scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:cache_recovery_file:s0 tclass=dir
      avc: denied { getattr } for path="/data/cache/backup"
      scontext=u:r:mediaprovider:s0:c512,c768
      tcontext=u:object_r:cache_private_backup_file:s0 tclass=dir
      
      Bug: 63038506
      Bug: 35197529
      Test: build police
      Change-Id: I51624c255e622bf712d41ca1bbf190ec3e4fefae
      (cherry picked from commit fcf1b2083935bd298a2ece8d6d0c18712865a04b)
      182dbeb6
    • 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
  3. Nov 08, 2017
    • Tri Vo's avatar
      init: label /proc dependencies and remove access to proc · 84e181bc
      Tri Vo authored
      New types and files labeled with them:
      1. proc_abi:
        /proc/sys/abi/swp
      
      2. proc_dirty:
        /proc/sys/vm/dirty_background_ratio
        /proc/sys/vm/dirty_expire_centisecs
      
      3. proc_diskstats:
        /proc/diskstats
      
      4. proc_extra_free_kbytes:
        /proc/sys/vm/extra_free_kbytes
      
      5. proc_hostname:
        /proc/sys/kernel/domainname
        /proc/sys/kernel/hostname
      
      6. proc_hung_task:
        /proc/sys/kernel/hung_task_timeout_secs
      
      7. proc_max_map_count:
        /proc/sys/vm/max_map_count
      
      8. proc_panic:
        /proc/sys/kernel/panic_on_oops
      
      9. proc_sched:
        /proc/sys/kernel/sched_child_runs_first
        /proc/sys/kernel/sched_latency_ns
        /proc/sys/kernel/sched_rt_period_us
        /proc/sys/kernel/sched_rt_runtime_us
        /proc/sys/kernel/sched_tunable_scaling
        /proc/sys/kernel/sched_wakeup_granularity_ns
      
      10. proc_uptime:
        /proc/uptime
      
      Files labeled with already existing types:
      1. proc_perf:
        /proc/sys/kernel/perf_event_paranoid
      
      2. proc_sysrq:
        /proc/sys/kernel/sysrq
      
      3. usermodehelper:
        /proc/sys/kernel/core_pipe_limit
      
      Changes to init domain:
      1. Removed access to files with 'proc' label.
      2. Added access to newly introduced types + proc_kmsg.
      
      Bug: 68949041
      Test: walleye boots without denials from u:r:init:s0.
      Test: system/core/init/grab-bootchart.sh does not trigger denials from
      u:r:init:s0
      Change-Id: If1715c3821e277679c320956df33dd273e750ea2
      84e181bc
    • Victor Hsieh's avatar
      Put pm.* property in new pm_prop context · d1cf3a40
      Victor Hsieh authored
      Test: system server does not crash with this change
      Bug: 67415855
      Bug: 63920015
      Change-Id: I3d0982220743137098dbc683d5c4aded105648c2
      d1cf3a40
    • Luis Hector Chavez's avatar
      Allow callers of uevent_kernel_*() access to /proc/sys/kernel/overflowuid · 640e595a
      Luis Hector Chavez authored
      Bug: 62378620
      Test: Android in Chrome OS can call uevent_kernel_recv() and not fail
            with EIO.
      Test: bullhead networking still works
      
      Change-Id: I4dd5d2148ee1704c4fa23d7fd82d1ade19b58cbd
      640e595a
  4. Nov 07, 2017
  5. Nov 06, 2017
  6. 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
  7. 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
  8. Nov 01, 2017
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. Oct 19, 2017
  15. 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
  16. Oct 16, 2017
  17. 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
  18. Oct 13, 2017
  19. 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
  20. 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
  21. Oct 09, 2017
Loading