Skip to content
Snippets Groups Projects
  1. Mar 30, 2018
  2. Mar 29, 2018
    • Joel Galenson's avatar
      Label /proc/sys/kernel/sched_schedstats. · 4b625e4a
      Joel Galenson authored
      This allows init to write to it, which it does for atrace.
      
      Bug: 72643420
      Test: Boot two devices, observe no denials, test atrace.
      Change-Id: I6810e5dcdfaff176bd944317e66d4fe612ccebed
      (cherry picked from commit dce07413)
      4b625e4a
    • Chenbo Feng's avatar
      Allow netutils_wrapper to use pinned bpf program · 2623ebcf
      Chenbo Feng authored
      The netutils_wrapper is a process used by vendor code to update the
      iptable rules on devices. When it update the rules for a specific chain.
      The iptable module will reload the whole chain with the new rule. So
      even the netutils_wrapper do not need to add any rules related to xt_bpf
      module, it will still reloading the existing iptables rules about xt_bpf
      module and need pass through the selinux check again when the rules are
      reloading. So we have to grant it the permission to reuse the pinned
      program in fs_bpf when it modifies the corresponding iptables chain so
      the vendor module will not crash anymore.
      
      Test: device boot and no more denials from netutils_wrapper
      Bug: 72111305
      Change-Id: I62bdfd922c8194c61b13e2855839aee3f1e349be
      2623ebcf
    • 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
  3. Mar 28, 2018
    • Jeff Vander Stoep's avatar
      Improve neverallows on /proc and /sys · 886aa54b
      Jeff Vander Stoep authored
      Access to these files was removed in Oreo. Enforce that access is not
      granted by partners via neverallow rule.
      
      Also disallow most untrusted app access to net.dns.* properties.
      
      Bug: 77225170
      Test: system/sepolicy/tools/build_policies.sh
      Change-Id: I85b634af509203393dd2d9311ab5d30c65f157c1
      886aa54b
    • Joel Galenson's avatar
      Hide some denials. · d93ef542
      Joel Galenson authored
      These denials occur fairly often, causing some logspam.
      
      Bug: 77225170
      Test: Boot device.
      Merged-In: Icd73a992aee44007d0873743f706758f9a19a112
      Change-Id: Icd73a992aee44007d0873743f706758f9a19a112
      (cherry picked from commit a66d1a45)
      d93ef542
  4. Mar 27, 2018
  5. Mar 26, 2018
    • Jeff Vander Stoep's avatar
      crashdump: cleanup logs · 627ba82b
      Jeff Vander Stoep authored
      Suppress WAI denials from crashdump.
      
      Test: build/flash Taimen. Verify no new denials.
      Bug: 68319037
      Change-Id: If39d057cb020def7afe89fd95e049e45cce2ae16
      (cherry picked from commit cc0304cf)
      627ba82b
    • Primiano Tucci's avatar
      Revert "Allow system server to set persist.traced.enable" · 4f673cf4
      Primiano Tucci authored
      This reverts commit 6f2040f8.
      
      Reason for revert: not needed anymore after ag/3773705
      This was meant to allow system_server toggling the property on/off.
      Later we realized that we needed a separate property for that 
      (see discussion in b/76077784) and system server happens to
      have already permissions to write to sys.* properties even without
      this CL.
      Reverting because at this point this creates just unnecessary clutter.
      
      Change-Id: Ia73d000aad3c4288a5652047dfe10896e231b0b1
      Test: perfetto_integrationtests
      Bug: 76077784
      4f673cf4
    • Primiano Tucci's avatar
      perfetto: allow traced to write into FDs received by the client · 5d317326
      Primiano Tucci authored
      This allows an optimization that consists in the "perfetto" cmdline
      client passing directly the file descriptor for the output trace
      to traced (as opposite to having traced streaming back the trace
      data to "perfetto" and having that one doing the write() into file).
      This reduces sensibly the memory traffic and CPU overhead of traces
      with a minor change.
      
      Bug: 73625179
      Test: builds + perfetto_integrationtests w/ long_trace.cfg
      Change-Id: I81f5a230338ced20dc543fd91c5a0bd0e58725f2
      5d317326
  6. Mar 23, 2018
    • Chenbo Feng's avatar
      Allow system server to access bpf fs · f83bbd17
      Chenbo Feng authored
      The permission to allow system_server to access sys/fs/bpf/ directory
      is missing. Add it back so it can get the bpf maps from the bpf_fs.
      
      Test: device boot and no more denial information of system_server try to
      searcg in fs_bpf
            atest android.net.cts.TrafficStatsTest
      Bug: 75285088
      
      Change-Id: I1040cde6c038eccc4e91c69a10b20aa7a18b19f6
      f83bbd17
  7. Mar 22, 2018
    • Mikhail Naganov's avatar
      Allow system_server to update timerslack_ns for hal_audio_default · e6293b1c
      Mikhail Naganov authored
      Based on the following audit message:
      
      type=1400 audit(1521738979.005:385): avc: denied { write } for pid=1269
      comm="Binder:1269_B" name="timerslack_ns" dev="proc" ino=254190
      scontext=u:r:system_server:s0 tcontext=u:r:hal_audio_default:s0
      tclass=file permissive=1
      
      Bug: 74110604
      Test: adb shell dmesg | grep hal_audio_default
      Change-Id: I4c2e787588eb9d223d5e50e1bc8f67876de97c2e
      e6293b1c
    • Primiano Tucci's avatar
      Fix selinux brekage on user for atrace · 68240241
      Primiano Tucci authored
      Follow up to aosp/635599. It broke user builds again
      despite being tree hugged because of b/74344625.
      Adding missing ignore entries.
      
      Bug: b/73340039
      Change-Id: Iba195d571aec9579195d79d4970f760e417608c6
      68240241
    • Primiano Tucci's avatar
      Reland: perfetto: allow traced_probes to execute atrace · feaf22b1
      Primiano Tucci authored
      This CL adds the SELinux permissions required to execute
      atrace and get userspace tracing events from system services.
      This is to enable tracing of events coming from surfaceflinger,
      audio HAL, etc.
      atrace, when executed, sets a bunch of debug.atrace. properties
      and sends an IPC via binder/hwbinder to tell the services to
      reload that property.
      
      This CL does NOT affect systrace. In that case (i.e. when
      atrace is executed from adb/shell) atrace still runs in
      the shell domain and none of those changes apply.
      
      Change-Id: I11b096d5c5c5593f18bce87f06c1a7b1ffa7910e
      Bug: b/73340039
      feaf22b1
  8. Mar 21, 2018
    • Chenbo Feng's avatar
      Allow netd to setup xt_bpf iptable rules · 5c95c168
      Chenbo Feng authored
      To better record the network traffic stats for each network interface.
      We use xt_bpf netfilter module to do the iface stats accounting instead
      of the cgroup bpf filter we currently use for per uid stats accounting.
      The xt_bpf module will take pinned eBPF program as iptables rule and run
      the program when packet pass through the netfilter hook. To setup the
      iptables rules. netd need to be able to access bpf filesystem and run the
      bpf program at boot time. The program used will still be created and
      pinned by the bpfloader process.
      
      Test: With selinux enforced, run "iptables -L -t raw" should show the
      xt_bpf related rule present in bw_raw_PREROUTING chain.
      Bug: 72111305
      
      Change-Id: I11efe158d6bd5499df6adf15e8123a76cd67de04
      5c95c168
  9. Mar 20, 2018
  10. Mar 19, 2018
    • Tri Vo's avatar
      proc_type attribute for files under /proc. · 41bf08e5
      Tri Vo authored
      With this attribute it will be easier to reference /proc files.
      
      Bug: 74182216
      Test: policy builds
      Change-Id: I5b7da508d821e45f122832261a742a201e8fdf2c
      41bf08e5
    • Chong Zhang's avatar
      allow mediaprovider to use media extractor · 8e3fef3d
      Chong Zhang authored
      When extraction exif info, certain file formats may requires
      parsing the container. Allow mediaprovider to use extractor
      to do the parsing.
      
      bug: 73978990
      Test: manually test the scenario in b/73978990 and verify
            the Exif is extracted correctly.
      
      Change-Id: I1cd46d793ebc9c38b816a3b63f361967e551d046
      8e3fef3d
    • Hector Dearman's avatar
      Allow system server to set persist.traced.enable · 6f2040f8
      Hector Dearman authored
      To enable/disable the traced and traced_probes deamons remotely we would
      like system server to be able to set persist.traced.enable.
      See also ag/3736001.
      
      Denial:
      selinux: avc: denied { set } for
      property=persist.traced.enable
      pid=1606 uid=1000 gid=1000
      scontext=u:r:system_server:s0
      tcontext=u:object_r:default_prop:s0 tclass=property_service
      permissive=0\x0a
      
      Run:
      $ adb shell 'ps -A | grep traced'
      Should see traced.
      $ adb shell 'settings put global sys_traced 0'
      $ adb shell 'ps -A | grep traced'
      Should no longer see traced.
      
      Test: See above.
      Change-Id: I245b7df3853cabeb0e75db41fb4facaa178ab8f1
      6f2040f8
  11. Mar 16, 2018
  12. Mar 13, 2018
    • Max Bires's avatar
      Adding ability for priv apps to read traceur fd · 715e2ae3
      Max Bires authored
      Only untrusted apps had privilegs to read file descriptors passed in
      from traceur, which was an oversight. This fixes the policy so that priv
      apps can also access file descriptors from traceur in order to read
      reports shared from traceur.
      
      Bug: 74435522
      Test: better bug has access to reports shared from traceur
      Change-Id: I591872cdac31eec62edbc81d95f1220f1152427f
      715e2ae3
  13. Mar 12, 2018
    • Aniket Kumar Lata's avatar
      sepolicy: Read access to audioserver for Bluetooth properties · d3d78004
      Aniket Kumar Lata authored
      Provide read/write access to audioserver for Bluetooth
      properties used with A2DP offload.
      
      Bug: 68824150
      Test: Manual; TestTracker/148125
      Change-Id: I40c932d085ac55bc45e6654f966b2c9d244263d0
      (cherry picked from commit 041049bc7a4e29dcca48e2c068b92aa8a8157d90)
      d3d78004
    • Sunny Kapdi's avatar
      Bluetooth A2DP offload: Binder call to audio HAL · bc0c88f3
      Sunny Kapdi authored
      Add rule to allow Binder call from Bluetooth process to Bluetooth
      audio HIDL interface running in audio HAL service process.
      
      Bug: 72242910
      Test: Manual; TestTracker/148125
      Change-Id: I1981a78bece10b8e516f218d3edde8b77943d130
      (cherry picked from commit e8cfac90e8bf14466b6431a21bc5ccd4bf6ca3ea)
      bc0c88f3
    • 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
  14. 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
  15. Mar 07, 2018
    • Joel Galenson's avatar
      Track platform_app SELinux denial. · fa793dea
      Joel Galenson authored
      This should fix presubmit tests.
      
      Bug: 74331887
      Test: Built policy.
      Change-Id: Ie9ef75a7f9eaebf1103e3d2f3b4521e9abaf2fe7
      (cherry picked from commit 2995e996)
      fa793dea
    • Joel Galenson's avatar
      Clean up bug_map. · e2bfdd32
      Joel Galenson authored
      Remove a fixed bug from bug_map.
      
      Bug: 62140539
      Test: Built policy.
      Change-Id: I2ce9e48de92975b6e37ca4a3a4c53f9478b006ef
      (cherry picked from commit f3f93eaf)
      e2bfdd32
    • Jiyong Park's avatar
      /odm is another vendor partition other than /vendor · 2f101551
      Jiyong Park authored
      Sub directories under /odm (or /vendor/odm when there isn't an odm
      partition) are labeled so that artifacts under the sub directories are
      treated the same as their counterpart in the vendor partition.
      
      For example, /odm/app/* is labeled as vendor_app_file just like
      /vendor/app/*.
      
      Bug: 71366495
      Test: m -j
      
      Change-Id: I72a14fd55672cd2867edd88ced9828ea49726694
      2f101551
Loading