Skip to content
Snippets Groups Projects
  1. 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
  2. Apr 10, 2018
    • Jeff Vander Stoep's avatar
      Start the process of locking down proc/net · 08731895
      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
      08731895
  3. 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
  4. Apr 06, 2018
    • Alan Stokes's avatar
      Installd doesn't need to create cgroup files. · 8e8c1093
      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
      8e8c1093
  5. Apr 05, 2018
  6. Apr 04, 2018
  7. 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
  8. Mar 29, 2018
    • Florian Mayer's avatar
      SELinux changes for I/O tracing. · 8d819055
      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
      Cherry-picked from aosp/631805
      Change-Id: I891a0209be981d760a828a69e4831e238248ebad
      Merged-In: I891a0209be981d760a828a69e4831e238248ebad
      8d819055
    • 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
      Suppress harmless denials for file creation in cgroupfs. · 92c149d0
      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
      92c149d0
    • 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
  9. Mar 28, 2018
    • Alan Stokes's avatar
      Stop O_CREAT logspam in permissive mode. · 7d4294cb
      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
      7d4294cb
    • Jaekyun Seok's avatar
      Allow vendor-init-settable to persist.radio.multisim.config · 7d3bd8db
      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
      Merged-In: Ie62b91e7e3d7e05425b742838417f1cab7b3fed4
      (cherry picked from commit ac8c6e3d)
      7d3bd8db
  10. 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
  11. Mar 21, 2018
  12. Mar 20, 2018
  13. Mar 19, 2018
  14. Mar 18, 2018
  15. Mar 16, 2018
  16. 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
    • Amit Mahajan's avatar
      Revert "Revert "Move rild from public to vendor."" · 312248ff
      Amit Mahajan authored
      This reverts commit 016f0a58.
      
      Reason for revert: Was temporarily reverted, merging back in with fix.
      
      Bug: 74486619
      Bug: 36427227
      Change-Id: Ide68726a90d5485c2758673079427407aee1e4f2
      312248ff
    • Bowgo Tsai's avatar
      Adding /odm support · 07ddddaf
      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
      (cherry picked from commit dd6efea2)
      07ddddaf
    • 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
  17. Mar 11, 2018
  18. 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
  19. Mar 08, 2018
    • Amit Mahajan's avatar
      Move rild from public to vendor. · eeda6c61
      Amit Mahajan authored
      Also change the neverallow exceptions to be for hal_telephony_server
      instead of rild.
      
      Test: Basic telephony sanity, treehugger
      Bug: 36427227
      Change-Id: If892b28416d98ca1f9c241c5fcec70fbae35c82e
      eeda6c61
  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 16, 2018
    • Robert Sesek's avatar
      Remove rules for starting the webview_zygote as a child of init. · ca4c4e57
      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.
      Change-Id: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
      ca4c4e57
  24. 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
  25. Feb 14, 2018
    • Robert Sesek's avatar
      SELinux changes to accomodate starting the webview_zygote as a child of the zygote. · bacb19b9
      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.
      Change-Id: I864743943c11c18de386010ecd4b616721cb9954
      bacb19b9
  26. Feb 09, 2018
  27. 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
  28. 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
  29. 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
  30. Jan 31, 2018
Loading