Skip to content
Snippets Groups Projects
  1. May 09, 2018
    • Paul Crowley's avatar
      Add wait_for_keymaster · 6af7af15
      Paul Crowley authored
      Bug: 79228237
      Test: audit2allow finds no relevant denials on boot
      Change-Id: Ia80b77ba9a1ec2354127cd0ef68d50ebcf593fb0
      6af7af15
    • Calin Juravle's avatar
      Allow system server to write profile snapshots in /data/misc/profman · 687d5e46
      Calin Juravle authored
      The goal is to allow creating profile snapshots from the shell command in
      order to be able to write CTS tests.
      
      The system server will dump profiles for debuggable in /data/misc/profman
      from where they will be pulled and verified by CTS tests.
      
      Test: adb shell cmd package snapshot-profile com.android.vending
      Bug: 74081010
      Change-Id: I54690305284b92c0e759538303cb98c93ce92dd5
      687d5e46
  2. May 07, 2018
    • Ray Essick's avatar
      give audioserver access to media.metrics · 2306cc04
      Ray Essick authored
      Let the audioserver record metrics with media.metrics service.
      This is for 'audiopolicy' metrics.
      
      Bug: 78595399
      Test: record from different apps, see records in 'dumpsys media.metrics'
      Change-Id: I63f9d4ad2d2b08eb98a49b8de5f86b6797ba2995
      2306cc04
  3. May 04, 2018
    • Calin Juravle's avatar
      Allow system server to record its own profile · 035fcc46
      Calin Juravle authored
      On userdebug builds we can now profile system server without disabling
      selinux. This is the final piece, and allows the system server to save its
      own profile.
      
      Test: manual, on a device with system server profiling enabled
      Bug: 73313191
      
      (cherry picked from commit 71d8467b)
      
      Change-Id: I93e7e01bfbd3146a8cfd26a1f6e88b640e9c4e0f
      035fcc46
  4. May 03, 2018
  5. Apr 26, 2018
  6. Apr 24, 2018
    • Joel Galenson's avatar
      Track otapreopt_chroot postinstall_file SELinux denial. · 81f4377a
      Joel Galenson authored
      Bug: 75287236
      Test: Built policy.
      Change-Id: I90301c33fd8c20e96cfbb424eaf80978e79c34f0
      (cherry picked from commit 5c87b879)
      81f4377a
    • Steven Moreland's avatar
      Allow dumpstate to be used as a lazy HAL. · 0b1797b8
      Steven Moreland authored
      hwservicemanager lost the permission to tell init to
      start the dumpstate HAL when dumpstate was given this
      permission exclusively.
      
      Bug: 77489941 # problem introduced
      Bug: 78509314 # converting dumpstate to lazy hals
      
      Test: convert an instance of dumpstate into a lazy HAL,
          run bugreport, see denial, then add permission, and
          see bugreport start to work again.
      
      Change-Id: I033701d8306200bebc0f250afe3d08f9e6ab98a1
      0b1797b8
  7. Apr 23, 2018
    • Pavel Maltsev's avatar
      Move automotive HALs sepolicy to system/ · 394dbe34
      Pavel Maltsev authored
      Bug: 70637118
      Test: build, flash and boot bat_land and owl automotive builds
      
      Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
      394dbe34
    • Wei Wang's avatar
      Allow dumpstate to kill dumpstate vendor HAL in timeout case · 60d17674
      Wei Wang authored
      Bug: 77489941
      Test: simulate delay in dumpstate HAL and get BR, see below from dumpstate_log.txt
          dumpstateBoard timed out after 10s, killing dumpstate vendor HAL
          dumpstateBoard failed: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: '
      Change-Id: I90ed5cb8fe8da8ad21ae77676433936cb12d9d04
      60d17674
    • Joel Galenson's avatar
      Track radio SELinux denial. · b26bc7d6
      Joel Galenson authored
      This should help fix presubmit tests.
      
      Bug: 78456764
      Test: Built policy.
      Change-Id: I7ec5afa83417770731d309d5a57b8a94afa24453
      (cherry picked from commit 8c0d4609)
      b26bc7d6
    • Lalit Maganti's avatar
      sepolicy: allow shell to read/write traced prop · 00c8e3d9
      Lalit Maganti authored
      This is to fix the CTS failures given by the bugs below where devices
      where traced is not enabled by default causes test failures.
      
      (cherry picked from commit 673b4db7)
      
      Bug: 78215159
      Bug: 78347829
      Change-Id: Ib0f6a1cdb770528dbbeb857368534ff5040e464e
      00c8e3d9
    • yro's avatar
      Allow radio to write to statsd · af8fb9f7
      yro authored
      The corresponding change in aosp is made at aosp/669146
      
      Violation:
      04-23 10:51:03.926  2103  2103 W m.android.phone: type=1400 audit(0.0:8): avc: denied { write } for name="statsdw" dev="tmpfs" ino=22538 scontext=u:r:radio:s0 tcontext=u:object_r:statsdw_socket:s0 tclass=sock_file permissive=0
      
      Bug: 78318738
      Test: manual
      Change-Id: I8aa70b07281df8a732f2f99d4d323961e425feea
      af8fb9f7
  8. Apr 20, 2018
  9. Apr 17, 2018
    • Chong Zhang's avatar
      Allow system_server to adjust cpuset for media.codec · ec0160a8
      Chong Zhang authored
      Bug: 72841545
      Change-Id: I30c1758e631a57f453598e60e6516da1874afcbf
      ec0160a8
    • Bookatz's avatar
      NO PARTIAL RERUN · 055a958d
      Bookatz authored
      Statsd sepolicy hal_health
      
      Statsd monitors battery capacity, which requires calls to the health
      hal.
      
      Fixes: 77923174
      Bug: 77916472
      Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.HostAtomTests#testFullBatteryCapacity
      Merged-In: I2d6685d4b91d8fbc7422dfdd0b6ed96bbddc0886
      Change-Id: I767068c60cff6c1baba615d89186705107531c02
      055a958d
  10. Apr 16, 2018
    • Joel Galenson's avatar
      Let vold_prepare_subdirs completely clean deleted user data. · 2bae5b96
      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
      (cherry picked from commit 254a872c)
      2bae5b96
    • Joel Galenson's avatar
      Add bug_map entries for bugs we've seen. · fb0aed74
      Joel Galenson authored
      This adds numerous bug_map entries to try to annotate all denials
      we've seen.
      
      Bug: 78117980
      Test: Build
      Change-Id: I1da0690e0b4b0a44d673a54123a0b49a0d115a49
      (cherry picked from commit f55786cf)
      fb0aed74
    • Jeff Sharkey's avatar
      Add exFAT support; unify behind "sdcard_type". · b469c300
      Jeff Sharkey authored
      We're adding support for OEMs to ship exFAT, which behaves identical
      to vfat.  Some rules have been manually enumerating labels related
      to these "public" volumes, so unify them all behind "sdcard_type".
      
      Test: atest
      Bug: 67822822
      Change-Id: I09157fd1fc666ec5d98082c6e2cefce7c8d3ae56
      b469c300
    • Tri Vo's avatar
      Sepolicy for rw mount point for vendors. · 210a805b
      Tri Vo authored
      Bug: 64905218
      Test: device boots with /mnt/vendor present and selinux label
      mnt_vendor_file applied correctly.
      Change-Id: Ib34e2859948019d237cf2fe8f71845ef2533ae27
      210a805b
  11. Apr 13, 2018
    • Joel Galenson's avatar
      Track storaged SELinux denial. · 2b840913
      Joel Galenson authored
      This should help fix presubmit tests.
      
      Bug: 77634061
      Test: Built policy.
      Change-Id: Ib9f15c93b71c2b67f25d4c9f949a5e2b3ce93b9c
      (cherry picked from commit c6b5a96b)
      2b840913
    • Joel Galenson's avatar
      Allow some vold_prepare_subdirs denials. · 44b6a7c3
      Joel Galenson authored
      This addresses the following denials:
      
      avc: denied { fowner } for comm="rm" scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:r:vold_prepare_subdirs:s0 tclass=capability
      avc: denied { getattr } for comm="rm" scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:storaged_data_file:s0 tclass=file
      avc: denied { relabelfrom } for comm="vold_prepare_su" name="storaged" scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
      avc: denied { getattr } for comm="rm" scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
      
      Bug: 77875245
      Test: Boot device.
      Test: Mislabel directories used by vold_prepare_subdirs, reboot, and
      ensure it can relabel them without denials.
      Test: Add user, reboot, delete user, reboot, observe no denials.
      
      (cherry picked from commit 855dd5a8)
      
      Merged-In: Id67bc99f151a6ccb9619bbfb7080452956405121
      Change-Id: Ic86be1e1afed37602255448e5700811d197403f9
      44b6a7c3
    • Jaekyun Seok's avatar
      Whitelist vendor-init-settable bluetooth_prop and wifi_prop · a11b16c9
      Jaekyun Seok authored
      Values of the following properties are set by SoC vendors on some
      devices including Pixels.
      - persist.bluetooth.a2dp_offload.cap
      - persist.bluetooth.a2dp_offload.enable
      - persist.vendor.bluetooth.a2dp_offload.enable
      - ro.bt.bdaddr_path
      - wlan.driver.status
      
      So they should be whitelisted for compatibility.
      
      Bug: 77633703
      Test: succeeded building and tested with Pixels
      Change-Id: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
      Merged-In: Ib2b81bcc1fd70ddd571dc7fb2b923b576d62b7d5
      (cherry picked from commit 224921d1)
      a11b16c9
  12. Apr 11, 2018
    • Jeff Vander Stoep's avatar
      hal_tetheroffload: move hwservice mapping to core policy · 3a346ea7
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { find } for
      interface=android.hardware.tetheroffload.config::IOffloadConfig
      scontext=u:r:system_server:s0
      tcontext=u:object_r:default_android_hwservice:s0
      tclass=hwservice_manager
      
      Bug: 77855688
      Test: build/boot Sailfish, turn on tethering, no selinux denial
      Change-Id: I97cae0928b5311a4da41d19cbd5c863c3137a49f
      3a346ea7
    • Jeff Vander Stoep's avatar
      Suppress spurious denial · 443a43c9
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { sys_resource } for comm="ip6tables" capability=24
      scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netutils_wrapper:s0
      tclass=capability
      
      Bug: 77905989
      Test: build and flash taimen-userdebug
      Change-Id: Ic5d7c96152b96b55255eeec00b19948f38c1923c
      443a43c9
  13. Apr 10, 2018
  14. Apr 09, 2018
    • Jeff Vander Stoep's avatar
      whitelist test failure that bypassed presubmit · 2ccd99a5
      Jeff Vander Stoep authored
      avc: denied { read } for comm="batterystats-wo" name="show_stat" dev="sysfs"
      scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file
      
      Bug: 77816522
      Test: build
      Change-Id: I50a9bfe1a9e4df9c84cf4b2b4aedbb8f82ac94cd
      2ccd99a5
  15. Apr 06, 2018
    • Mikhail Naganov's avatar
      Add shell:fifo_file permission for audioserver · c5815891
      Mikhail Naganov authored
      Bug: 73405145
      Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioRecordTest#testRecordNoDataForIdleUids
      Change-Id: I09bdb74c9ecc317ea090643635ca26165efa423a
      c5815891
    • Florian Mayer's avatar
      Grant traced_probes search on directories. · 269c9665
      Florian Mayer authored
      This is needed to be able to scan the labels we have
      permission on.
      
      Denial:
      
      04-06 12:52:22.674   874   874 W traced_probes: type=1400 audit(0.0:10314): avc: denied { search } for name="backup" dev="sda45" ino=6422529 scontext=u:r:traced_probes:s0 tcontext=u:object_r:backup_data_file:s0 tclass=dir permissive=0
      
      Bug: 73625480
      
      cherry-picked from aosp/658243
      Change-Id: I52f3865952004bfc6fe22c488d768276866f8ae1
      Merged-In: I52f3865952004bfc6fe22c488d768276866f8ae1
      269c9665
    • 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
    • Alan Stokes's avatar
      Add /sys/kernel/memory_state_time to sysfs_power. · a8b3634d
      Alan Stokes authored
      This allows system_server to access it for determining battery stats
      (see KernelMemoryBandwidthStats.java).
      
      batterystats-wo: type=1400 audit(0.0:429): avc: denied { read } for name="show_stat" dev="sysfs" ino=48071 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
      
      Bug: 72643420
      Bug: 73947096
      
      Test: Denial is no longer present.
      Change-Id: Ibe46aee48eb3f78fa5a9d1f36602c082c33036f7
      a8b3634d
  16. Apr 05, 2018
  17. Apr 04, 2018
    • Jeff Vander Stoep's avatar
      priv_app: remove more logspam · 558cdf1e
      Jeff Vander Stoep authored
      avc: denied { read } for name="ext4" dev="sysfs" ino=32709
      scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0
      tclass=dir permissive=0 b/72749888
      avc: denied { read } for name="state" dev="sysfs" ino=51318
      scontext=u:r:priv_app:s0:c512,c768
      tcontext=u:object_r:sysfs_android_usb:s0 tclass=file permissive=0
      b/72749888
      
      Bug: 72749888
      Test: build/boot taimen-userdebug. No more logspam
      Change-Id: Ic43d1c8b71e1e5e0e6f9af1e03816c4084120e7e
      558cdf1e
  18. Apr 03, 2018
    • Nathan Harold's avatar
      Allow getsockopt and setsockopt for Encap Sockets · ea4eaaf1
      Nathan Harold authored
      Because applications should be able to set the receive
      timeout on UDP encapsulation sockets, we need to allow
      setsockopt(). getsockopt() is an obvious allowance as
      well.
      
      Bug: 68689438
      Test: compilation
      Change-Id: I2eaf72bcce5695f1aee7a95ec03111eca577651c
      ea4eaaf1
  19. Mar 31, 2018
  20. Mar 30, 2018
    • Chenbo Feng's avatar
      Allow netutils_wrapper to use pinned bpf program · be9b15c5
      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
      (cherry picked from aosp commit 2623ebcf)
      be9b15c5
  21. 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
Loading