Skip to content
Snippets Groups Projects
  1. May 15, 2018
  2. May 04, 2018
    • Jeff Vander Stoep's avatar
      Start the process of locking down proc/net · 7a4af30b
      Jeff Vander Stoep authored
      Files in /proc/net leak information. This change is the first step in
      determining which files apps may use, whitelisting benign access, and
      otherwise removing access while providing safe alternative APIs.
      
      To that end, this change:
      * Introduces the proc_net_type attribute which will assigned to any
      new SELinux types in /proc/net to avoid removing access to privileged
      processes. These processes may be evaluated later, but are lower
      priority than apps.
      * Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing
      use by VPN apps. This may be replaced by an alternative API.
      * Audits all other proc/net access for apps.
      * Audits proc/net access for other processes which are currently
      granted broad read access to /proc/net but should not be including
      storaged, zygote, clatd, logd, preopt2cachename and vold.
      
      Bug: 9496886
      Bug: 68016944
      Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube
          navigate maps, send text message, make voice call, make video call.
          Verify no avc "granted" messages in the logs.
      Test: A few VPN apps including "VPN Monster", "Turbo VPN", and
      "Freighter". Verify no logspam with the current setup.
      Test: atest CtsNativeNetTestCases
      Test: atest netd_integration_test
      Test: atest QtaguidPermissionTest
      Test: atest FileSystemPermissionTest
      
      Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457
      Merged-In: I7e49f796a25cf68bc698c6c9206e24af3ae11457
      (cherry picked from commit 08731895)
      7a4af30b
  3. May 02, 2018
    • Tri Vo's avatar
      SELinux type for vendor public libs. · 29497b62
      Tri Vo authored
      Vendor public libs are exposed to apps (not system), and their ABI
      stability is guaranteed by vendor. Introducing new selinux type so that
      we don't conflate concepts of same-process HAL and vendor public lib.
      The former is exposed to all domains, while the latter should only be
      acessible by apps.
      
      Bug: 76413554
      Test: build-only change, policy builds
      Change-Id: I89dad351374f46c7fe2726991eb4c05064c37ed5
      29497b62
  4. May 01, 2018
  5. Apr 25, 2018
    • Zheng Zhang's avatar
      Allow mediaserver to access vendor_app_file · 3623c2b6
      Zheng Zhang authored
      Currently, when vendor APK try to use MediaPlayer to play its audio
      resource, it would fail due to this neverallow rules.
      
      avc: denied { read } for path="/vendor/app/TicFitness/TicFitness.apk" dev="dm-1" ino=183 scontext=u:r:mediaserver:s0 tcontext=u:object_r:vendor_app_file:s0 tclass=file permissive=0
      
      Bug: 78436043
      Change-Id: Id910184c16955f9e4e4c8d3bb6eca2253ab59063
      3623c2b6
  6. Apr 18, 2018
    • Tom Cherry's avatar
      Allow vendor_init to access unencrypted_data_file · 620dc7f8
      Tom Cherry authored
      FBE needs to access these files to set up or verify encryption for
      directories during mkdir.
      
      Bug: 77850279
      Test: walleye + more restrictions continues to have FBE work
      Change-Id: I84e201436ce4531d36d1257d932c3e2e772ea05e
      (cherry picked from commit 18a28440)
      620dc7f8
  7. Apr 17, 2018
    • Tri Vo's avatar
      Sepolicy for rw mount point for vendors. · 8c1a1b24
      Tri Vo authored
      Bug: 64905218
      Test: device boots with /mnt/vendor present and selinux label
      mnt_vendor_file applied correctly.
      Change-Id: Ib34e2859948019d237cf2fe8f71845ef2533ae27
      Merged-In: Ib34e2859948019d237cf2fe8f71845ef2533ae27
      (cherry picked from commit 210a805b)
      8c1a1b24
    • Mark Salyzyn's avatar
      init: lock down access to keychord_device · f14f7354
      Mark Salyzyn authored
      The out-of-tree keychord driver is only intended for use by init.
      
      Test: build
      Bug: 64114943
      Bug: 78174219
      Change-Id: I96a7fbcd9a54a38625063606f5c4ab6d40d701f6
      f14f7354
  8. Apr 16, 2018
    • Joel Galenson's avatar
      Let vold_prepare_subdirs completely clean deleted user data. · 254a872c
      Joel Galenson authored
      After adding a new user, deleting it, and rebooting, some of the user's data still remained.  This adds the SELinux permissions necessary to remove all of the data.  It fixes the followign denials:
      
      avc: denied { rmdir } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
      avc: denied { unlink } for scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
      
      Bug: 74866238
      Test: Create user, delete user, reboot user, see no denials or
      leftover data.
      
      Change-Id: Ibc43bd2552b388a9708bf781b5ad206f21df62dc
      254a872c
    • Jaekyun Seok's avatar
      Allow dumpstate to read property_type · 4de238e9
      Jaekyun Seok authored
      dumpstate needs to read all the system properties for debugging.
      
      Bug: 77277669
      Test: succeeded building and tested with taimen
      Change-Id: I3603854b3be67d4fc55d74f7925a21bfa59c81ee
      4de238e9
  9. Apr 13, 2018
    • Tom Cherry's avatar
      Allow vendor_init to write to misc_block_device · db465285
      Tom Cherry authored
      Vendors may use this to write custom messages to their bootloader, and
      as the bootloader is under vendor control, this makes sense to allow.
      
      Bug: 77881566
      Test: build
      Change-Id: I78f80400e5f386cad1327a9209ee1afc8e334e56
      db465285
  10. Apr 09, 2018
    • Alan Stokes's avatar
      Installd doesn't need to create cgroup files. · 06bac37f
      Alan Stokes authored
      cgroupfs doesn't allow files to be created, so this can't be needed.
      
      Also remove redundant neverallow and dontaudit rules. These are now
      more broadly handled by domain.te.
      
      Bug: 74182216
      
      Test: Denials remain silenced.
      
      Change-Id: If7eb0e59f567695d987272a2fd36dbc251516e9f
      
      (cherry picked from commit 8e8c1093)
      06bac37f
  11. Apr 04, 2018
  12. Mar 30, 2018
    • Florian Mayer's avatar
      SELinux changes for I/O tracing. · 9fcf22bb
      Florian Mayer authored
      See also go/perfetto-io-tracing-security.
      
      * Grant CAP_DAC_READ_SEARCH to traced_probes.
      * Allow traced_probes to list selected labels.
      * Change ext4 and f2fs events to be available on user builds.
      
      Bug: 74584014
      Change-Id: I891a0209be981d760a828a69e4831e238248ebad
      9fcf22bb
  13. Mar 29, 2018
    • Alan Stokes's avatar
      Suppress harmless denials for file creation in cgroupfs. · 832a7042
      Alan Stokes authored
      The kernel generates file creation audits when O_CREAT is passed even
      if the file already exists - which it always does in the cgroup cases.
      
      We add neverallow rules to prevent mistakenly allowing unnecessary
      create access. We also suppress these denials, which just add noise to
      the log, for the more common culprits.
      
      Bug: 72643420
      Bug: 74182216
      
      Test: Ran build_policies.sh and checked failures were unrelated.
      Test: Device still boots, denials gone.
      Change-Id: I034b41ca70da1e73b81fe90090e656f4a3b542dc
      (cherry picked from commit 92c149d0)
      832a7042
    • Alan Stokes's avatar
      Stop O_CREAT logspam in permissive mode. · 19425d3e
      Alan Stokes authored
      In permissive mode we get more spurious denials when O_CREAT is used
      with an already-existing file. They're harmless so we don't need to
      audit them.
      
      Example denials:
      denied { add_name } for name="trigger" scontext=u:r:init:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=dir permissive=1
      denied { create } for name="trigger" scontext=u:r:init:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=file permissive=1
      
      Bug: 72643420
      Bug: 74182216
      
      Test: Device boots, denials gone.
      Change-Id: I54b1a0c138ff5167f1d1d12c4b0b9e9afaa5bca0
      (cherry picked from commit 7d4294cb)
      19425d3e
  14. Mar 27, 2018
    • Jaekyun Seok's avatar
      Allow vendor-init-settable to persist.radio.multisim.config · ac8c6e3d
      Jaekyun Seok authored
      A default value of persist.radio.multisim.config can be set by SoC
      vendors, and so vendor-init-settable should be allowed to it.
      
      Bug: 73871799
      Test: succeeded building and tested with taimen
      Change-Id: Ie62b91e7e3d7e05425b742838417f1cab7b3fed4
      ac8c6e3d
  15. Mar 21, 2018
  16. Mar 19, 2018
  17. Mar 16, 2018
  18. Mar 12, 2018
    • Amit Mahajan's avatar
      Revert "Revert "Move rild from public to vendor."" · 3007344d
      Amit Mahajan authored
      This reverts commit 016f0a58.
      
      Reason for revert: Was temporarily reverted, merging back in with fix.
      
      Test: Basic telephony sanity, treehugger
      Bug: 74486619
      Bug: 36427227
      Merged-in: Ide68726a90d5485c2758673079427407aee1e4f2
      Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
      (cherry picked from commit 312248ff)
      3007344d
    • Amit Mahajan's avatar
      Revert "Move rild from public to vendor." · 58758dc2
      Amit Mahajan authored
      This reverts commit aed57d4e.
      
      Reason for revert: This CL is expected to break pre-submit tests (b/74486619)
      
      Merged-in: I103c3faa1604fddc27b3b4602b587f2d733827b1
      Change-Id: I0eb7a744e0d43ab15fc490e7e7c870d0f44e1401
      58758dc2
    • Bowgo Tsai's avatar
      Adding /odm support · dd6efea2
      Bowgo Tsai authored
      /odm partition isn't mandatory and the following symlinks will exist on
      a device without /odm partition.
      
        /odm/app ->/vendor/odm/app
        /odm/bin ->/vendor/odm/bin
        /odm/etc ->/vendor/odm/etc
        /odm/firmware ->/vendor/odm/firmware
        /odm/framework ->/vendor/odm/framework
        /odm/lib -> /vendor/odm/lib
        /odm/lib64 -> /vendor/odm/lib64
        /odm/overlay -> /vendor/odm/overlay
        /odm/priv-app -> /vendor/odm/priv-app
      
      This CL allows all domains to access the symlinks, also removes the
      Treble compliance neverallows on them because the actual restrictions
      should apply to the real path directly.
      
      Bug: 70678783
      Test: boot a device
      Change-Id: If1522780a13710d8a592272dc688685cbae29f52
      dd6efea2
  19. Mar 10, 2018
    • Amit Mahajan's avatar
      Move rild from public to vendor. · aed57d4e
      Amit Mahajan authored
      Also change the neverallow exceptions to be for hal_telephony_server
      instead of rild.
      
      Test: Basic telephony sanity, treehugger
      Bug: 36427227
      Merged-in: If892b28416d98ca1f9c241c5fcec70fbae35c82e
      Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
      aed57d4e
  20. Feb 28, 2018
    • Jeff Vander Stoep's avatar
      kernel: exempt from vendor_file restrictions · 1242c940
      Jeff Vander Stoep authored
      The kernel is unusual in that it's both a core process, but vendor
      provided. Exempt it from the restriction against accessing files from
      on /vendor. Also, rework the neverallow rule so that it disallows
      opening/modifying files, but allows reading files passed over IPC.
      
      Bug: 68213100
      Test: build (this is a build-time test)
      Change-Id: I2f6b2698ec45d2e8480dc1de47bf12b9b53c4446
      1242c940
  21. Feb 23, 2018
    • Robert Sesek's avatar
      Remove rules for starting the webview_zygote as a child of init. · 869562e9
      Robert Sesek authored
      The webview_zygote is now launched as a child-zygote process from the
      main zygote process.
      
      Bug: 63749735
      Test: m
      Test: Launch "Third-party licenses" activity from Settings, and it
            renders correctly via the WebView.
      Merged-In: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
      Change-Id: I153476642cf14883b0dfea0d9f5b3b5e30ac1c08
      869562e9
    • Jeff Vander Stoep's avatar
      Useful neverallow errors · 7636d607
      Jeff Vander Stoep authored
      Neverallow errors include the file name and line number of the
      violated rule. However, if multiple neverallow rules are included
      within a single macro, then the line number is for the entire macro,
      not the individual neverallow rule that is violated. To fix this,
      only include one neverallow rule per macro.
      
      This changes nothing on device, nor does it change the results of
      compilation, it only makes the printed errors more useful.
      
      Bug: 69139821
      Test: build aosp_taimen-userdebug (neverallow rules are build time
          tests)
      
      Change-Id: Id0fc5906431db20e71265c7e9d55fbee4bdf53db
      7636d607
  22. Feb 22, 2018
    • Sandeep Patil's avatar
      Add label for kernel test files and executables · 34e35e9e
      Sandeep Patil authored
      
      This required for kernel to do loopback mounts on filesystem
      images created by the kernel system call tests in LTP.
      
      Add a corresponding neverallow to stop all domains from accessing
      the location at /data/local/tmp/ltp.
      
      Bug: 73220071
      Test: Boot sailfish successfully
      Test: run vts-kernel -m VtsKernelLtp -t syscalls.fchown04
      
      Change-Id: I73f5f14017e22971fc246a05751ba67be4653bca
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      34e35e9e
  23. Feb 15, 2018
    • Robert Sesek's avatar
      SELinux changes to accomodate starting the webview_zygote as a child of the zygote. · febdfa4e
      Robert Sesek authored
      In this architecture, the system_server instructs the zygote to fork a
      child-zygote to be the webview_zygote. The system_server tells this new
      zygote to listen for fork requests on a random abstract unix socket of
      its choosing.
      
      A follow-up CL will remove the rules for starting webview_zygote via
      init.
      
      Bug: 63749735
      Test: m
      Test: Launch "Third-party licenses" activity from Settings, and it
            renders correctly via the WebView.
      Merged-In: I864743943c11c18de386010ecd4b616721cb9954
      Change-Id: I1c352e47b66eca3a3fa641daa6ecc3e7a889b54e
      febdfa4e
  24. Feb 09, 2018
  25. Feb 08, 2018
    • Jeff Vander Stoep's avatar
      label /data/vendor{_ce,_de} · d25ccabd
      Jeff Vander Stoep authored
      Restrictions introduced in vendor init mean that new devices
      may not no longer exempt vendor init from writing to system_data_file.
      This means we must introduce a new label for /data/vendor which
      vendor_init may write to.
      
      Bug: 73087047
      Test: build and boot Taimen and Marlin. Complete SUW, enroll fingerprint
          No new denials.
      
      Change-Id: I65f904bb28952d4776aab947515947e14befbe34
      d25ccabd
  26. Feb 07, 2018
    • Tri Vo's avatar
      shell: remove from system_executes_vendor_violators. · bfe51254
      Tri Vo authored
      And grant explicit exemption from system_executes_vendor_violators
      neverallow rules.
      
      This does not change the policy, but is needed to test the violator
      attribute for emptiness.
      
      Bug: 72662597
      Test: build sepolicy
      Change-Id: Iba79bb42e1381b221fe0dc53470f62f8267a4791
      bfe51254
  27. Feb 05, 2018
    • Carmen Jackson's avatar
      Use a whitelisting strategy for tracefs. · 2c8ca45d
      Carmen Jackson authored
      This changes tracefs files to be default-enabled in debug mode, but
      default-disabled with specific files enabled in user mode.
      
      Bug: 64762598
      Test: Successfully took traces in user mode.
      
      Change-Id: I572ea22253e0c1e42065fbd1d2fd7845de06fceb
      2c8ca45d
  28. Jan 31, 2018
  29. Jan 30, 2018
    • Jeff Vander Stoep's avatar
      Test that /data is properly labeled · ccf965e9
      Jeff Vander Stoep authored
      Data outside of /data/vendor should have the core_data_file_type.
      Exempt data_between_core_and_vendor for some types.
      
      Ensure core_data_file_type and coredomain_socket do not get expanded
      to their underlying types.
      
      Test: build sepolicy for all targets in master (this is a build time
          test)
      Bug: 34980020
      Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a
      (cherry picked from commit bdd45479)
      ccf965e9
  30. Jan 29, 2018
    • Tom Cherry's avatar
      Remove vendor_init from coredomain · 9c778045
      Tom Cherry authored
      vendor_init exists on the system partition, but it is meant to be an
      extention of init that runs with vendor permissions for executing
      vendor scripts, therefore it is not meant to be in coredomain.
      
      Bug: 62875318
      Test: boot walleye
      Merged-In: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      9c778045
  31. Jan 25, 2018
  32. Jan 23, 2018
  33. Jan 22, 2018
Loading