Skip to content
Snippets Groups Projects
  1. Oct 24, 2018
    • Tom Cherry's avatar
    • Tom Cherry's avatar
      Combine vendor-init-actionable with vendor-init-readable · 30dd7111
      Tom Cherry authored
      Historically, vendor-init-actionable was created since the various
      property_contexts files were not yet available when init parses its
      scripts.  Since then, the property_contexts files are now always
      available when init parses its scripts, so we can collapse these two
      categories.
      
      Specifically, this change ensures that all of the properties in the
      previous 'stable_properties.h' file in init, which contained the
      vendor-init-actionable properties, are able to be read by init
      according to SEPolicy.
      
      Bug: 71814576
      Test: vendor_init fails to use non-readable properties as a trigger
      Test: vendor_init successfully uses readable properties as a trigger
      
      Change-Id: Ic6d9919b6047f3076a1a19fc26295c6a77aca627
      30dd7111
  2. Oct 23, 2018
    • Jeff Sharkey's avatar
      910de2a4
    • Sudheer Shanka's avatar
      Merge "Track vrcore_app SELinux denial" · 11da725c
      Sudheer Shanka authored
      11da725c
    • Jeff Sharkey's avatar
      sepolicy should be fully developed in AOSP. · ee64b0bc
      Jeff Sharkey authored
      Bug: 113136846
      Test: manual
      Change-Id: I5c515ca4eafb39c4c3d04b3e736471ae38d38545
      ee64b0bc
    • Nick Kralevich's avatar
      update_engine_common: expand default allowed ioctl list · 7b5e82a8
      Nick Kralevich authored
      update_engine does a lot to keep partitions secure and tidy. Allow the
      ioctls necessary to allow that to happen.
      
      Addresses the following denials:
      
      update_engine: type=1400 audit(0.0:6): avc: denied { ioctl } for path="/dev/block/sda20" dev="tmpfs" ino=13850 ioctlcmd=1277 scontext=u:r:update_engine:s0 tcontext=u:object_r:boot_block_device:s0 tclass=blk_file permissive=0
      update_engine: type=1400 audit(0.0:8): avc: denied { ioctl } for path="/dev/block/sda20" dev="tmpfs" ino=13850 ioctlcmd=127c scontext=u:r:update_engine:s0 tcontext=u:object_r:boot_block_device:s0 tclass=blk_file permissive=0
      update_engine: type=1400 audit(0.0:9): avc: denied { ioctl } for path="/dev/block/sda20" dev="tmpfs" ino=13850 ioctlcmd=127f scontext=u:r:update_engine:s0 tcontext=u:object_r:boot_block_device:s0 tclass=blk_file permissive=0
      update_engine: type=1400 audit(0.0:13): avc: denied { ioctl } for path="/dev/block/sda18" dev="tmpfs" ino=12601 ioctlcmd=127d scontext=u:r:update_engine:s0 tcontext=u:object_r:custom_ab_block_device:s0 tclass=blk_file permissive=0
      
      Bug: 118319505
      Test: policy compiles.
      Change-Id: I424f2a13ced2324b4c0c35b0f510b9aea748d5aa
      7b5e82a8
    • Sudheer Shanka's avatar
      Track vrcore_app SELinux denial · 95767cce
      Sudheer Shanka authored
      Bug: 118185801
      Test: bug no. appears in the denial logs
      Change-Id: Ib1d1bbbdf25e0e63ac8a7dec98aca08cafc3f870
      95767cce
    • Nick Kralevich's avatar
      Expand BLKROGET and BLKROSET to all block devices. · e844681c
      Nick Kralevich authored
      Update engine is responsible for updating various partitions, which
      includes enabling or disabling the read-only bit on the underlying block
      device.
      
      Rather than try to list out each block device separately, generalize the
      ioctl rules to apply to all block device nodes. If the ioctl permission
      is granted via a normal allow rule, then the allowxperm statement will
      allow BLKROGET and BLKROSET by default on those block devices.
      
      Test: policy compiles
      Bug: 118150702
      Change-Id: I7bca52e0f442df7320748f6d6371e5016aa6dd0b
      e844681c
    • Nick Kralevich's avatar
      vold.te: allow BLKSECDISCARD · 787fc8d0
      Nick Kralevich authored
      vold needs to securely delete content from various block devices. Allow
      it.
      
      Addresses the following denials:
      
      type=1400 audit(0.0:66): avc: denied { ioctl } for comm="secdiscard" path="/dev/block/dm-3" dev="tmpfs" ino=17945 ioctlcmd=0x127d scontext=u:r:vold:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0
      type=1400 audit(0.0:43): avc: denied { ioctl } for comm="secdiscard" path="/dev/block/sda45" dev="tmpfs" ino=17485 ioctlcmd=127d scontext=u:r:vold:s0 tcontext=u:object_r:userdata_block_device:s0 tclass=blk_file permissive=0
      
      Test: policy compiles.
      Change-Id: Ie7b4b8ac4698d9002a4e8d142d4e463f8d42899a
      787fc8d0
  3. Oct 22, 2018
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
    • Tri Vo's avatar
      asan: restore global access to system_asan_options_file. · 3d2e200b
      Tri Vo authored
      Bug: 118161817
      Test: SANITIZE_TARGET=address m selinux_policy
      Change-Id: I4dabcb3692c59b810a06567e272bca9f0e9c3ecd
      3d2e200b
    • Joel Galenson's avatar
      Allow dumpstate to call mediaswcodec over binder · 33ded4a6
      Joel Galenson authored
      This prevents denials while taking a bugreport.
      
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t
      android.security.cts.SELinuxHostTest#testNoBugreportDenials
      
      Change-Id: I381b39fa127f82fcef5d820a04209fd1ba4f63cd
      33ded4a6
    • Nick Kralevich's avatar
      update_engine_common: allow BLKROGET and BLKROSET · eacbcc98
      Nick Kralevich authored
      Allow BLKROGET and BLKROSET on the block devices underlying the /system
      and rootfs partitions. As part of the Android boot process, the system
      sets the block devices read-only to prevent accidental modification to
      these partitions. Update engine needs the ability to adjust the block
      device read-only flag in order to apply updates.
      
      Addresses the following denials:
      
      update_engine: type=1400 audit(0.0:96): avc: denied { ioctl } for path="/dev/block/sda33" dev="tmpfs" ino=15369 ioctlcmd=125e scontext=u:r:update_engine:s0 tcontext=u:object_r:system_block_device:s0 tclass=blk_file permissive=0
      update_engine: type=1400 audit(0.0:97): avc: denied { ioctl } for path="/dev/block/sda33" dev="tmpfs" ino=15369 ioctlcmd=125d scontext=u:r:update_engine:s0 tcontext=u:object_r:system_block_device:s0 tclass=blk_file permissive=0
      
      Test: policy compiles
      Bug: 118150702
      Change-Id: I65a3d041b6d6b7955bcd901637a543524fc34a06
      eacbcc98
    • Treehugger Robot's avatar
      2779f92c
    • Treehugger Robot's avatar
      faba4312
    • Nick Kralevich's avatar
      fastbootd.te: Delete allowxperm statement · 392ac0fd
      Nick Kralevich authored
      system/sepolicy commit 4c8eaba7, reviewed in
      https://android-review.googlesource.com/c/platform/system/sepolicy/+/793958
      started enforcing explicit ioctl permission checks for all block device
      files. As part of that commit, the following lines were added to
      domain.te:
      
        # If a domain has access to perform an ioctl on a block device, allow these
        # very common, benign ioctls
        allowxperm domain dev_type:blk_file ioctl { BLKGETSIZE64 BLKSSZGET };
      
      In essence, if a domain is granted ioctl access to any device in
      policy (for example, via adding "ioctl" to the allow rule, or by using
      the macro "r_file_perms" which includes the ioctl permission), then the
      two ioctls BLKGETSIZE64 and BLKSSZGET will be automatically allowed. As
      such, it is redundent for a domain to explicitly request these two
      ioctls.
      
      Delete the now redundant allowxperm rule.
      
      Test: policy compiles
      Change-Id: I1964ed93a7c7601393cc9e2416f3640ea22db51b
      392ac0fd
  4. Oct 20, 2018
  5. Oct 19, 2018
  6. Oct 18, 2018
    • Nick Kralevich's avatar
      start enforcing ioctl restrictions on blk_file · 4c8eaba7
      Nick Kralevich authored
      Start enforcing the use of ioctl restrictions on all Android block
      devices. Domains which perform ioctls on block devices must be explicit
      about what ioctls they issue. The only ioctls allowed by default are
      BLKGETSIZE64, BLKSSZGET, FIOCLEX, and FIONCLEX.
      
      Test: device boots and no problems.
      Change-Id: I1195756b20cf2b50bede1eb04a48145a97a35867
      4c8eaba7
    • Treehugger Robot's avatar
      2581761e
    • Nick Kralevich's avatar
      priv_app: remove /proc/net access · dfc3c336
      Nick Kralevich authored
      Remove most of /proc/net access for priv_apps. Files in /proc/net leak
      unique device identifiers and side channel information about other app's
      network connections.
      
      Access for most third party applications was removed in commit
      d78e07cb. This change applies the same
      constraints to priv-apps that we apply to normal apps.
      
      Bug: 114475727
      Bug: 9496886
      Bug: 68016944
      Test: policy compiles and device boots
      Change-Id: I5c41ba57fcd6b81d72c4f3a40b310d2188fc79c3
      dfc3c336
    • Nick Kralevich's avatar
      Allow TCGETS on pipes (fifo_file) · 67900089
      Nick Kralevich authored
      Allow a process to determine if a fifo_file (aka pipe, created from the
      pipe() or pipe2() syscall) is a tty.
      
      Addresses the following denials:
      
      type=1400 audit(0.0:1307): avc: denied { ioctl } for comm="ls" path="pipe:[213117]" dev="pipefs" ino=213117 ioctlcmd=5401 scontext=u:r:hal_dumpstate_impl:s0 tcontext=u:r:hal_dumpstate_impl:s0 tclass=fifo_file permissive=0
      type=1400 audit(0.0:22): avc: denied { ioctl } for comm="sh" path="pipe:[54971]" dev="pipefs" ino=54971 ioctlcmd=5401 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:r:untrusted_app_27:s0:c512,c768 tclass=fifo_file permissive=0 app=com.zhihu.android
      type=1400 audit(0.0:237): avc: denied { ioctl } for comm="sh" path="pipe:[56997]" dev="pipefs" ino=56997 ioctlcmd=5401 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=fifo_file permissive=0 app=fm.qingting.qtradio
      
      Test: policy compiles and device builds.
      Change-Id: Ic4c6441d0ec33de8cda3f13ff529e98374897364
      67900089
    • Nick Kralevich's avatar
      Move class bpf definition · f5a1b1bf
      Nick Kralevich authored
      No functional change. This reorg just makes it easier to perform diffs
      against https://github.com/SELinuxProject/refpolicy/blob/master/policy/flask/access_vectors
      
      Test: policy builds.
      Change-Id: I10cf9547d57981c76ee7e76daa382bb504e36d0b
      f5a1b1bf
    • Tri Vo's avatar
      a8131148
    • Jiyong Park's avatar
      Allow apexd to realpath(3) on apex_key_files · ecc09871
      Jiyong Park authored
      apexd uses realpath(3) to ensure that the public key file that will use
      is under /system/etc/security/apex directory. In order to support it,
      allow apexd to getattr on apex_key_files.
      
      The canonicalization is required because the key name from APEX might be
      wrong. For example, if the key name from an APEX is '../../some/path'
      then apexd will use '/system/etc/security/apex/../../some/path' as the
      public key file, which is incorrect.
      
      Bug: 115721587
      Test: m apex.test; m
      /apex/com.android.example.apex@1 exists
      
      Change-Id: I6dc5efa0de369f8497e4f6526e0164e2de589c67
      ecc09871
    • Zheng Zhang's avatar
      Allow mediaserver domain have getatrr perm on vendor_app_file · a26763ec
      Zheng Zhang authored
      When running some apps in vendor partition, it report denials like:
      
      avc: denied { getattr } for comm="Binder:901_2" path="/vendor/operator/app/Wechat/Wechat.apk" dev="sde14" ino=1707 scontext=u:r:mediaserver:s0 tcontext=u:object_r:vendor_app_file:s0 tclass=file permissive=0
      a26763ec
Loading