Skip to content
Snippets Groups Projects
  1. Mar 12, 2018
    • 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
  2. Mar 08, 2018
    • Jaekyun Seok's avatar
      Allow public-readable to persist.rcs.supported · 9ddba296
      Jaekyun Seok authored
      For now, persist.rcs.supported has only vendor-init-settable, but it
      turned out that the property should be read by vendor components in
      some devices including 2018 Pixels.
      
      Bug: 74266614
      Test: succeeded building and tested on a blueline device with
      PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true
      
      Change-Id: I926eb4316c178a39693300fe983176acfb9cabec
      9ddba296
  3. Mar 07, 2018
  4. Mar 01, 2018
    • Alan Stokes's avatar
      Allow hal_vibrator access to sysfs_vibrator files. · 17d008ae
      Alan Stokes authored
      We already grant rw file access, but without dir search it's not much
      use.
      
      denied { search } for name="vibrator" dev="sysfs" ino=49606 scontext=u:r:hal_vibrator_default:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=dir permissive=0
      
      Bug: 72643420
      Test: Builds, denial gone
      Change-Id: I3513c0a14f0ac1e60517009046e2654f1fc45c66
      17d008ae
    • huans's avatar
      Add shell:fifo_file permission for cameraserver · a6acef9a
      huans authored
      Bug: 73952536
      Test: run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.IdleUidTest#testCameraAccessBecomingInactiveUid
      Change-Id: I508352671367dfa106e80108c3a5c0255b5273b2
      a6acef9a
  5. 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
    • Haynes Mathew George's avatar
      audio: Enable vndbinder use from hal_audio · ebc7b434
      Haynes Mathew George authored
      Allow hal audio to use vndbinder
      
      Change-Id: I83fc8d5b873bfc4e36f44e423d5740cb5e9739ee
      ebc7b434
  6. Feb 27, 2018
    • Jaekyun Seok's avatar
      Allow vendor-init-settable to persist.sys.zram_enabled · b47efe34
      Jaekyun Seok authored
      persist.sys.zram_enabled is set in vendor/build.prop in taimen and walleye,
      which was added after the initial whitelist.
      go/treble-sysprop-compatibility requires whitelisting such a property to
      allow it to be overridden by vendor/{default|build}.prop.
      
      Bug: 73905119
      Test: succeeded building and test with taimen
      Change-Id: I931182aa05eb90c14df6e2c7cc26913f3874fa18
      b47efe34
    • Alan Stokes's avatar
      Suppress noisy performanced denials in permissive mode. · cf71a5ae
      Alan Stokes authored
      The sheer volume of these can cause confusion.
      
      Sample denials (repeated for many processes):
      denied { getattr } for path="/proc/1/status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1
      denied { open } for path="/proc/1" dev="proc" ino=18608 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=dir permissive=1
      denied { open } for path="/proc/1/status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1
      denied { read } for name="status" dev="proc" ino=24427 scontext=u:r:performanced:s0 tcontext=u:r:init:s0 tclass=file permissive=1
      
      Bug: 72643420
      Test: Denials no longer present in permissive mode.
      Change-Id: Ic07b9b0b59ca2122c4843095b63075ab8fd2c70b
      cf71a5ae
    • Alan Stokes's avatar
      Allow init to create & write to vibrator/trigger. · 5a570606
      Alan Stokes authored
      The write is here: https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc#257.
      
      Denials (on a device with the sysfs_vibrator label properly applied):
      denied { write } for name="vibrator" dev="sysfs" ino=49613 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=dir
      denied { write } for name="trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file
      denied { open } for path="/sys/devices/<redacted>/vibrator/trigger" dev="sysfs" ino=49620 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file
      
      Bug: b/72643420
      Test: Device boots, denials gone
      
      Change-Id: Ib50d9a8533303daccb1330685e3204bea3fbd8a8
      5a570606
  7. Feb 26, 2018
  8. 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
  9. 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
  10. Feb 21, 2018
    • Primiano Tucci's avatar
      perfetto: Make producer socket MLS-aware · 5ef6669b
      Primiano Tucci authored
      The previous selinux rules obtained via audit2allow didn't really
      work with the case of apps connecting to the producer socket,
      despite all the allow rules being correctly in place.
      This was failing our CTS tests.
      
      The reason for the failure (see denials pasted below) is due to
      Multi Level Security (for multi-user), which was still preventing
      apps form a different level to connect to the traced producer
      socket and write to the shmem buffers they get passed back.
      This CL tags the objects being accessed as mlstrusted.
      CTS tests pass with this CL.
      
      Denials:
      avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
      avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
      avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
      avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
      avc: denied { write } for pid=8545 comm="traced_probes" path=2F6D656D66643A706572666574746F5F73686D656D202864656C6574656429 dev="tmpfs" ino=104483 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_tmpfs:s0 tclass=file permissive=1
      
      Change-Id: I1598bc0b07bf39b8d0420b66caf06a4ca884f383
      Bug: 73340039
      Test: CtsPerfettoTestCases
      5ef6669b
  11. 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
  12. Feb 15, 2018
    • Roshan Pius's avatar
      wificond.te: Remove unnecessary permissions · 8fa0be5c
      Roshan Pius authored
      Since wificond is no longer writing supplicant/hostapd conf files, we
      don't need these permissions anymore.
      
      Bug: 36645291
      Test: Device boots up & connects to networks.
      Change-Id: I625dfdc2c0349e128b81e01097ccb439f73beb4d
      8fa0be5c
    • 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
  13. 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
  14. Feb 13, 2018
  15. Feb 09, 2018
    • Tom Cherry's avatar
      Prevent vendor_init from using binder or sockets · a099830e
      Tom Cherry authored
      Bug: 72809699
      Test: build
      Change-Id: Ifb66ad13557af7d2dc6d3ef823e326a5fba51b24
      a099830e
    • Chenbo Feng's avatar
      Block SDK 28 app from using proc/net/xt_qtaguid · 5ec8f843
      Chenbo Feng authored
      The file under /proc/net/xt_qtaguid is going away in future release.
      Apps should use the provided public api instead of directly reading the
      proc file. This change will block apps that based on SDK 28 or above to
      directly read that file and we will delete that file after apps move
      away from it.
      
      Test: Flashed with master branch on marlin, verified phone boot, can
            browse web, watch youtube video, make phone call and use google
            map for navigation with wifi on and off.
            run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
            run cts -m CtsAppSecurityHostTestCases -t \
            		android.appsecurity.cts.AppSecurityTests
      
      Change-Id: I4c4d6c9ab28b426acef23db53f171de8f20be1dc
      5ec8f843
  16. 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
  17. 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
  18. Feb 06, 2018
  19. Feb 05, 2018
    • Mark Salyzyn's avatar
      lmkd: add live-lock killer daemon · d583e596
      Mark Salyzyn authored
      llkd needs the ability to forcibly crash the kernel if
      cause is unlikely to result in an orderly shutdown. It
      also needs to scan /proc/<pid> for additional process
      information.
      
      Test: lmkd_unit_test --gtest_filter=llkd.*
      Bug: 33808187
      Change-Id: I7f158a13814e79d5ec71fe90dbc7461abb521945
      d583e596
    • Mark Salyzyn's avatar
      lmkd: add live-lock killer daemon · dea7da52
      Mark Salyzyn authored
      llkd needs the ability to forcibly crash the kernel if
      cause is unlikely to result in an orderly shutdown. It
      also needs to scan /proc/<pid> for additional process
      information.
      
      Test: lmkd_unit_test --gtest_filter=llkd.*
      Bug: 33808187
      Change-Id: I7f158a13814e79d5ec71fe90dbc7461abb521945
      dea7da52
    • Jaekyun Seok's avatar
      Add tests for compatible property (1/2) · 64ade65d
      Jaekyun Seok authored
      The feature of compatible property has its own neverallow rules and it
      is enforced on devices launchig with Android P.
      
      This CL changes hal_nfc to hal_nfc_server in neverallow rules because
      sepolicy-analyze doesn't recognize it. Additionally one more neverallow
      rule is added to restrict reading nfc_prop.
      
      Bug: 72013705
      Bug: 72678352
      Test: 'run cts -m CtsSecurityHostTestCases' on walleye with
      ro.product.first_api_level=28
      
      Change-Id: I753cc81f7ca0e4ad6a2434b2a047052678f57671
      64ade65d
    • 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
    • Andrew Scull's avatar
      authsecret HAL policies. · 64f35fa0
      Andrew Scull authored
      Bug: 71527305
      Test: compile and boot
      Change-Id: I91097bd62d99b8dd9eb6f53060badbaf0f4b8b4a
      (cherry picked from commit 1aedf4b5)
      64f35fa0
  20. Feb 02, 2018
    • Jeff Vander Stoep's avatar
      Enable Traceur on user builds. · de04528c
      Jeff Vander Stoep authored
      Test: Standard Traceur workflow works successfully with no
      selinux denials on a user build.
      Bug: 64762598
      Change-Id: I0dfe506d463b63d70c5bda03f8706041ea7ab448
      de04528c
    • Jeff Vander Stoep's avatar
      te_macros: remove print macro · d28c0569
      Jeff Vander Stoep authored
      aosp/605217 adds the following lines:
      genfscon tracefs /options/print-tgid u:object_r:debugfs_tracing:s0
      genfscon debugfs /tracing/options/print-tgid u:object_r:debugfs_tracing:s0
      
      However, the m4 pre-processing step of selinux policy compilation outputs:
      genfscon tracefs /options/-tgid u:object_r:debugfs_tracing:s0
      genfscon debugfs /tracing/options/-tgid u:object_r:debugfs_tracing:s0
      
      And as a result of the "print" it prints:
      m4: system/sepolicy/private/genfs_contexts: 177:
      m4: system/sepolicy/private/genfs_contexts: 203:
      
      Due to the following macro:
      https://android.googlesource.com/platform/system/sepolicy/+/oreo-mr1-dev/public/te_macros#580
      
      This change removes the now-deprecated print macro to unblock
      aosp/605217.
      
      Bug: 72862003
      Test: verify that the m4 output for aosp/605217 is correct.
      Change-Id: Ia4ec96e16b98e8df241cceb64e3f3b7bea9a7f3d
      d28c0569
  21. Feb 01, 2018
  22. Jan 31, 2018
  23. Jan 30, 2018
    • Chenbo Feng's avatar
      Remove app access to qtaguid ctrl/stats file · fad0b04d
      Chenbo Feng authored
      Remove the untrusted apps and priviledged apps from the group that can
      directly access xt_qtaguid module related file. All apps that need to
      access app network usage data need to use the public API provided in
      framework.
      
      Test: Flashed with master branch on marlin, verified phone boot, can
            browse web, watch youtube video, make phone call and use google
            map for navigation with either wifi is on or off.
            run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
            run cts -m CtsNativeNetTestCases
      Bug: 68774956 30950746
      
      Change-Id: I9b3db819d6622611d5b512ef821abb4c28d6c9eb
      fad0b04d
    • 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
Loading