Skip to content
Snippets Groups Projects
  1. Apr 09, 2018
    • Max Bires's avatar
      Adding labeling for vendor security patch prop · 5cac1aa9
      Max Bires authored
      This will allow adb shell getprop ro.vendor.build.security_patch to
      properly return the correct build property, whereas previously it was
      offlimits due to lack of label.
      
      Test: adb shell getprop ro.vendor.build.security_patch successfully
      returns whatever VENDOR_SECURITY_PATCH is defined to be in the Android
      .mk files
      
      Change-Id: Ie8427738125fc7f909ad8d51e4b76558f5544d49
      5cac1aa9
    • 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
  2. Apr 06, 2018
    • Yifan Hong's avatar
      hal_health: allow to write kernel logs. · 5ef48cf8
      Yifan Hong authored
      This is originally allowed in healthd but the permission
      was not transfered to health HAL. A typical health HAL
      implementation is likely to write battery info to kernel
      logs.
      
      Test: device has battery kernel logs with health HAL
            but without healthd
      
      Bug: 77661605
      
      Change-Id: Ib3b5d3fe6bdb3df2a240c85f9d27b863153805d2
      5ef48cf8
    • Yifan Hong's avatar
      hal_health: allow to write kernel logs. · 306b2671
      Yifan Hong authored
      This is originally allowed in healthd but the permission
      was not transfered to health HAL. A typical health HAL
      implementation is likely to write battery info to kernel
      logs.
      
      Test: device has battery kernel logs with health HAL
            but without healthd
      
      Bug: 77661605
      
      Change-Id: Ib3b5d3fe6bdb3df2a240c85f9d27b863153805d2
      306b2671
    • 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
  3. Apr 05, 2018
  4. Apr 04, 2018
  5. Apr 03, 2018
    • Jeff Vander Stoep's avatar
      Rename qtaguid_proc to conform to name conventions · bdf2a9c4
      Jeff Vander Stoep authored
      Test: build
      Bug: 68774956
      Change-Id: I0f9fd87eb41e67e14f35e49eba13e3d1de745250
      bdf2a9c4
    • Chenbo Feng's avatar
      Block SDK 28 app from using proc/net/xt_qtaguid · c411ff70
      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
      (cherry picked from commit 5ec8f843)
      c411ff70
    • Jeff Vander Stoep's avatar
      Add untrusted_app_27 · 3aa7ca56
      Jeff Vander Stoep authored
      This is a partial cherry pick of commit 6231b4d9
      'Enforce per-app data protections for targetSdk 28+'.
      
      Untrusted_app_27 remains unreachable, but it's existence
      prevents future merge conflicts.
      
      Bug: 63897054
      Test: build/boot aosp_walleye-userdebug
      Change-Id: I64b013874fe87b55f47e817a1279e76ecf86b7c0
      Merged-In: I64b013874fe87b55f47e817a1279e76ecf86b7c0
      (cherry picked from commit 6231b4d9)
      3aa7ca56
    • Jeff Vander Stoep's avatar
      Remove deprecated tagSocket() permissions · 0d1e52a5
      Jeff Vander Stoep authored
      tagSocket() now results in netd performing these actions on behalf
      of the calling process.
      
      Remove direct access to:
      /dev/xt_qtaguid
      /proc/net/xt_qtaguid/ctrl
      
      Bug: 68774956
      Test: -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AppSecurityTests
          -m CtsNativeNetTestCases
      Test: stream youtube, browse chrome
      Test: go/manual-ab-ota
      Change-Id: I6a044f304c3ec4e7c6043aebeb1ae63c9c5a0beb
      0d1e52a5
    • Jeff Tinker's avatar
      Allow dumpstate to trace drm hals · 4f2739bd
      Jeff Tinker authored
      Change-Id: Id7823a3130443107beb4d97426807a6395cf6930
      related-to-bug:74607984
      test:adb bugreport and check for drm trace dumps
      4f2739bd
  6. Apr 02, 2018
    • Jaekyun Seok's avatar
      Allow vendor_init_settable for persist.sys.sf.native_mode · d2a6c235
      Jaekyun Seok authored
      A default value of persist.sys.sf.native_mode could be set by SoC
      partners in some devices including some pixels.
      So it should have vendor_init_settable accessibility.
      
      Bug: 74266614
      Test: succeeded building and tested with a pixel device with
      PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true.
      
      Change-Id: I5d7a029f82505983d21dc722541fb55761a8714d
      Merged-In: I5d7a029f82505983d21dc722541fb55761a8714d
      (cherry picked from commit 0dc35873)
      d2a6c235
    • Andreas Gampe's avatar
      Selinux: Fix perfprofd policy · bda72633
      Andreas Gampe authored
      Update for debugfs labeling changes.
      
      Update for simpleperf behavior with stack traces (temp file).
      
      (cherry picked from commit c8fe29ff)
      
      Bug: 73175642
      Test: m
      Test: manual - run profiling, look for logs
      Merged-In: Ie000a00ef56cc603f498d48d89001f566c03b661
      Change-Id: Ie000a00ef56cc603f498d48d89001f566c03b661
      bda72633
    • Andreas Gampe's avatar
      Selinux: Fix perfprofd policy · c8fe29ff
      Andreas Gampe authored
      Update for debugfs labeling changes.
      
      Update for simpleperf behavior with stack traces (temp file).
      
      Bug: 73175642
      Test: m
      Test: manual - run profiling, look for logs
      Change-Id: Ie000a00ef56cc603f498d48d89001f566c03b661
      c8fe29ff
    • Jiyong Park's avatar
      Reland "Allow dexopt to follow /odm/lib(64) symlinks."" · c29028f4
      Jiyong Park authored
      This reverts commit 942500b9.
      
      Bug: 75287236
      Test: boot a device
      Merged-In: If81a2d2a46979ffbd536bb95528c3b4ebe3483df
      Change-Id: If81a2d2a46979ffbd536bb95528c3b4ebe3483df
      (cherry picked from commit a6d9d6b6)
      c29028f4
    • Jaekyun Seok's avatar
      Allow vendor_init_settable for persist.sys.sf.native_mode · 0dc35873
      Jaekyun Seok authored
      A default value of persist.sys.sf.native_mode could be set by SoC
      partners in some devices including some pixels.
      So it should have vendor_init_settable accessibility.
      
      Bug: 74266614
      Test: succeeded building and tested with a pixel device with
      PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true.
      
      Change-Id: I5d7a029f82505983d21dc722541fb55761a8714d
      0dc35873
    • Jiyong Park's avatar
      Reland "Allow dexopt to follow /odm/lib(64) symlinks."" · a6d9d6b6
      Jiyong Park authored
      This reverts commit 942500b9.
      
      Bug: 75287236
      Test: boot a device
      Change-Id: If81a2d2a46979ffbd536bb95528c3b4ebe3483df
      a6d9d6b6
  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
    • Pawin Vongmasa's avatar
      Put in sepolicies for Codec2.0 services · 4be28894
      Pawin Vongmasa authored
      Test: Builds
      
      Bug: 64121714
      Bug: 31973802
      Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
      4be28894
    • 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
    • Elliott Hughes's avatar
      Remove unused dalvik.vm.stack-trace-dir. · 7bab223b
      Elliott Hughes authored
      Bug: http://b/73140330
      Test: boots
      Change-Id: I8fd27c6eb8c99870cb77019ae06bdb46a934ffc9
      7bab223b
    • 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
    • Andreas Gampe's avatar
      Statsd: Allow statsd to contact perfprofd in userdebug · 2767f9d3
      Andreas Gampe authored
      Give statsd rights to connect to perfprofd in userdebug.
      
      (cherry picked from commit 488030ee)
      
      Bug: 73175642
      Test: mmma system/extras/perfprofd
      Merged-In: Idea0a6b757d1b16ec2e6c8719e24900f1e5518fd
      Change-Id: Idea0a6b757d1b16ec2e6c8719e24900f1e5518fd
      2767f9d3
  10. Mar 27, 2018
    • Tri Vo's avatar
      Fix aosp healthd. · dd7d5a70
      Tri Vo authored
      We only need this change for aosp devices. Internal sepolicy for healthd
      domain is different and does not need this.
      
      Addresses this denial:
      avc: denied { open } for path="/sys/class/power_supply" dev="sysfs"
      ino=25340 scontext=u:r:healthd:s0 tcontext=u:object_r:sysfs:s0
      tclass=dir permissive=1
      
      Test: $OUT/vendor/etc/selinux/precompiled_sepolicy contains the new
      permission.
      Change-Id: Ie47c231af800026fd9d8a1f752253bb338768c13
      dd7d5a70
    • Janis Danisevskis's avatar
      Keystore needs to be able to call apps · 3de9cd95
      Janis Danisevskis authored
      The ConfirmationUI API has a callback interface by which confirmation
      results are presented to the calling app. This requires keystore to call
      into apps.
      
      Test: Device boots and no more denials when call back is delivered to
            apps.
      Bug: 63928580
      Change-Id: Ie23211aeb74c39956c3c3b8b32843d35afa1315a
      3de9cd95
    • Janis Danisevskis's avatar
      Keystore needs to be able to call apps · a290f576
      Janis Danisevskis authored
      The ConfirmationUI API has a callback interface by which confirmation
      results are presented to the calling app. This requires keystore to call
      into apps.
      
      Test: Device boots and no more denials when call back is delivered to
            apps.
      Bug: 63928580
      Change-Id: Ie23211aeb74c39956c3c3b8b32843d35afa1315a
      a290f576
    • Andreas Gampe's avatar
      Statsd: Allow statsd to contact perfprofd in userdebug · 488030ee
      Andreas Gampe authored
      Give statsd rights to connect to perfprofd in userdebug.
      
      Test: mmma system/extras/perfprofd
      Change-Id: Idea0a6b757d1b16ec2e6c8719e24900f1e5518fd
      488030ee
    • 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 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
    • Jeff Vander Stoep's avatar
      crashdump: cleanup logs · cc0304cf
      Jeff Vander Stoep authored
      Suppress WAI denials from crashdump.
      
      Test: build/flash Taimen. Verify no new denials.
      Bug: 68319037
      Change-Id: If39d057cb020def7afe89fd95e049e45cce2ae16
      cc0304cf
    • 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
  12. Mar 23, 2018
    • Tri Vo's avatar
      modprobe: shouldn't load kernel modules from /system · e5542494
      Tri Vo authored
      Kernel modules are not permitted to be on /system partition.
      That was one of Treble requirements in O:
      https://source.android.com/devices/architecture/kernel/modular-kernels#file-locations
      
      Bug: 74069409
      Test: pixel/nexus devices don't have LKMs in /system, so this change
      shoudl be harmless.
      Test: walleye boots without issues from modprobe.
      Merged-In: I8b3aeb55aacb3c99e0486224161d09a64bb52cd1
      Change-Id: I8b3aeb55aacb3c99e0486224161d09a64bb52cd1
      
      (cherry picked from commit 6ef9f523)
      e5542494
    • Jong Wook Kim's avatar
      Wifi HAL SIOCSIFHWADDR sepolicy · 04133651
      Jong Wook Kim authored
      Add sepolicy rule to grant Wifi HAL permission to use SIOCSIFHWADDR
      ioctl. This permission is needed to dynamically change MAC address of
      the device.
      
      We are moving the implementation of setting the MAC address from
      WifiCond to Vendor HAL to give vendors flexibility in supporting
      Connected MAC Randomization. Will clean up WifiCond sepolicy afterwards.
      
      Bug: 74347653
      Test: Verified manually
      Change-Id: I334cefddf385ecb1ee169eb692c4e0060c26d6d9
      04133651
Loading