Skip to content
Snippets Groups Projects
  1. Jan 23, 2018
  2. Jan 22, 2018
    • Steven Moreland's avatar
      Clarify sysfs_leds neverallow. · 623d9f06
      Steven Moreland authored
      Now that init no longer uses it.
      
      Fixes: 70846424
      Test: no neverallows tripped
      Change-Id: I5c22dd272b66fd32b4758c1dce659ccd98b8a7ba
      623d9f06
    • Max Bires's avatar
      Adding write permissions to traceur · 35c36389
      Max Bires authored
      Fixing denials that stopped traceur from being able to write to
      debugfs_tracing. Also cleaning up general find denials for services that
      traceur doesn't have permission to access.
      
      Additionally, labeling /data/local/trace as a trace_data_file in order
      to give traceur a UX friendly area to write its traces to now that it
      will no longer be a shell user. It will be write/readable by traceur,
      and deletable/readable by shell.
      
      Test: Traceur functionality is not being blocked by selinux policy
      Bug: 68126425
      Change-Id: I201c82975a31094102e90bc81454d3c2a48fae36
      35c36389
    • Steven Moreland's avatar
      Add policy for 'blank_screen'. · 8bda3dfa
      Steven Moreland authored
      This util allows init to turn off the screen
      without any binder dependencies.
      
      Bug: 70846424
      Test: manual + init use
      Change-Id: I4f41a966d6398e959ea6baf36c2cfe6fcebc00de
      8bda3dfa
  3. Jan 20, 2018
  4. Jan 19, 2018
    • Tao Bao's avatar
      Add rules for system_update service. · d7d9cfca
      Tao Bao authored
      system_update service manages system update information: system updater
      (priv_app) publishes the pending system update info through the service,
      while other apps can read the info accordingly (design doc in
      go/pi-ota-platform-api).
      
      This CL adds the service type, and grants priv_app to access the service.
      
      Bug: 67437079
      Test: Build and flash marlin image. The system_update service works.
      Change-Id: I7a3eaee3ecd3e2e16b410413e917ec603566b375
      d7d9cfca
    • Paul Crowley's avatar
      Allow access to the metadata partition for metadata encryption. · ab318e30
      Paul Crowley authored
      Bug: 63927601
      Test: Enable metadata encryption in fstab on Taimen, check boot success.
      Change-Id: Id425c47d48f413d6ea44ed170835a52d0af39f9f
      ab318e30
    • Daniel Rosenberg's avatar
      Label esdfs as sdcardfs · 9d0d6856
      Daniel Rosenberg authored
      Test: esdfs should be mountable and usable with selinux on
      Bug: 63876697
      Change-Id: I7a1d96d3f0d0a6dbc1c98f0c4a96264938011b5e
      9d0d6856
    • Yifan Hong's avatar
      move /vendor VINTF data to /vendor/etc/vintf · 8d8da6a2
      Yifan Hong authored
      Test: boots
      Test: hwservicemanager can read these files
      Bug: 36790901
      Change-Id: I0431a7f166face993c1d14b6209c9b502a506e09
      8d8da6a2
    • Badhri Jagan Sridharan's avatar
      hal_usb_gadget sepolicy · 7bee33e6
      Badhri Jagan Sridharan authored
      Bug: 63669128
      Test: Checked for avc denail messages.
      Change-Id: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
      Merged-In: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
      7bee33e6
    • Yao Chen's avatar
      Allow dumpstate to call statsd. This is needed for bugreport. · b10ff337
      Yao Chen authored
      Selinux violations while calling dump() on statsd by bugreport.
      
      avc: denied { call } for scontext=u:r:dumpstate:s0 tcontext=u:r:statsd:s0 tclass=binder permissive=1
      denied { use } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fd permissive=1
      avc: denied { write } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1
      avc: denied { getattr } for path="pipe:[411602]" dev="pipefs" ino=411602 scontext=u:r:statsd:s0 tcontext=u:r:dumpstate:s0 tclass=fifo_file permissive=1
      
      Test: manual
      Change-Id: I46c5b119548378cc80c6e4498d00edad5959d188
      b10ff337
    • Steven Moreland's avatar
      Disallow sysfs_leds to coredomains. · 09fddac1
      Steven Moreland authored
      Bug: 70846424
      Test: neverallow not tripped
      Change-Id: I9e351ee906162a594930b5ab300facb5fe807f13
      09fddac1
  5. Jan 18, 2018
    • Tri Vo's avatar
      neverallow shell access to 'device' type · 5dab9134
      Tri Vo authored
      Bug: 65643247
      Test: builds, the change doesn't affect runtime behavior.
      
      Change-Id: I621a8006db7074f124cb16a12662c768bb31e465
      5dab9134
    • Pavel Grafov's avatar
      Allow system apps to read log props. · 118e4969
      Pavel Grafov authored
      This is needed to allow system apps to know whether security
      logging is enabled, so that they can in this case log additional
      audit events.
      
      Test: logged a security event from locally modified KeyChain app.
      Bug: 70886042
      Change-Id: I9e18d59d72f40510f81d1840e4ac76a654cf6cbd
      118e4969
    • Jeff Vander Stoep's avatar
      Suppress denials for non-API access · 6d8a876a
      Jeff Vander Stoep authored
      avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
      tcontext=u:object_r:proc_version:s0 tclass=file
      avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
      tcontext=u:object_r:wifi_prop:s0 tclass=file
      avc: denied { read } scontext=u:r:priv_app:s0:c512,c768
      tcontext=u:object_r:net_dns_prop:s0 tclass=file
      
      Bug: 72151306
      Test: build
      Change-Id: I4b658ccd128746356f635ca7955385a89609eea1
      6d8a876a
    • Jaekyun Seok's avatar
      Add default namespaces of odm properties · afca82a3
      Jaekyun Seok authored
      Since /odm is an extension of /vendor, its default property contexts
      should be consistent with ones of /vendor.
      
      Bug: 36796459
      Test: tested on wahoo devices
      Change-Id: Ia67ebe81e9c7102aab35a34f14738ed9a24811d3
      afca82a3
  6. Jan 17, 2018
    • Chenbo Feng's avatar
      Add sepolicy to lock down bpf access · 566411ed
      Chenbo Feng authored
      Add a new set of sepolicy for the process that only netd use to load
      and run ebpf programs. It is the only process that can load eBPF
      programs into the kernel and is only used to do that. Add some
      neverallow rules regarding which processes have access to bpf objects.
      
      Test: program successfully loaded and pinned at sys/fs/bpf after device
      boot. No selinux violation for bpfloader
      Bug: 30950746
      
      Change-Id: Ia6bb1afda29ae0749bdc368e2dfc5faa12e81b2f
      566411ed
    • Tri Vo's avatar
      system_server: remove access sysfs_devices_system_cpu · 35c65c1e
      Tri Vo authored
      CpuFrequency.java seems to be the only thing that depends on
      /sys/devices/system/cpu in system_server. And according to
      b/68988722#comment15, that dependency is not exercised.
      
      Bug: 68988722
      Test: walleye boots without denials to sysfs_devices_system_cpu
      Change-Id: If777b716bf74188581327b7f5aa709f5d88aad2d
      35c65c1e
    • Svet Ganov's avatar
      Don't record audio if UID is idle - sepolicy · b9a1e7ba
      Svet Ganov authored
      If a UID is in an idle state we don't allow recording to protect
      user's privacy. If the UID is in an idle state we allow recording
      but report empty data (all zeros in the byte array) and once
      the process goes in an active state we report the real mic data.
      This avoids the race between the app being notified aboout its
      lifecycle and the audio system being notified about the state
      of a UID.
      
      Test: Added - AudioRecordTest#testRecordNoDataForIdleUids
            Passing - cts-tradefed run cts-dev -m CtsMediaTestCases
                    -t android.media.cts.AudioRecordTest
      
      bug:63938985
      
      Change-Id: I8c044e588bac4182efcdc08197925fddf593a717
      b9a1e7ba
    • Jeff Vander Stoep's avatar
      Annotate denials · 1e1a3f7c
      Jeff Vander Stoep authored
      There is a race condition between when /data is mounted
      and when processes attempt to access it. Attempting to access
      /data before it's mounted causes an selinux denial. Attribute
      these denials to a bug.
      
      07-04 23:48:53.646   503   503 I auditd  : type=1400 audit(0.0:7): avc:
      denied { search } for comm="surfaceflinger" name="/" dev="sda35" ino=2
      scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:unlabeled:s0
      tclass=dir permissive=0
      07-15 17:41:18.100   582   582 I auditd  : type=1400 audit(0.0:4): avc:
      denied { search } for comm="BootAnimation" name="/" dev="sda35" ino=2
      scontext=u:r:bootanim:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir
      permissive=0
      
      Bug: 68864350
      Test: build
      Change-Id: I07f751d54b854bdc72f3e5166442a5e21b3a9bf5
      1e1a3f7c
    • Tri Vo's avatar
      storaged: remove access to sysfs_type · 48027a00
      Tri Vo authored
      Bug: 68388678
      Test: storaged-unit-tests
      Change-Id: Iea1ba0131a389dc4396ff3ebe2cdf68dbd688c8a
      48027a00
  7. Jan 16, 2018
    • Jaekyun Seok's avatar
      Fix TODOs of duplicate property names for prefix and exact matching · f9d27887
      Jaekyun Seok authored
      Duplicate property names are supported now for prefix and exact
      matching.
      
      Bug: 38146102
      Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
      Change-Id: Ifd9d32eaece7370d69f121e88d5541f7a2e34458
      f9d27887
    • Michael Butler's avatar
      Allow applications to use NN API HAL services · ea331aa7
      Michael Butler authored
      The NeuralNetworks runtime is a library that communicates with
      NeuralNetworks HIDL services and is linked by applications. To enable
      the NN runtime to use these services, applications must have explicit
      sepolicy permissions to find the NN services and communicate across
      binder.
      
      This CL relaxes neverallow rules for hal_neuralnetworks_*.
      
      Because it is affecting pre-existing neverallow rules, this CL requires
      a CTS rebuild.
      
      Bug: 70340780
      Test: mm
      Test: ran neuralnetworks vts and cts binaries
      Change-Id: I84f73ac77486681f91d1f8687268c0fa22a7ba0b
      (cherry picked from commit 598870bebc4bb34542df81799b46f3cdcfb6723b)
      ea331aa7
    • Yifan Hong's avatar
      Allow shell to start vendor shell · 00ab5d86
      Yifan Hong authored
      Test: adb shell /vendor/bin/sh
      Fixes: 65448858
      Change-Id: Ic2c9fa9b7e5bed3e1532f4e545f54a857ea99fc6
      00ab5d86
  8. Jan 15, 2018
    • Nathan Harold's avatar
      Allow More Apps to Recv UDP Sockets from SystemServer · ee268643
      Nathan Harold authored
      This gives the privilege to system apps, platform apps,
      ephemeral apps, and privileged apps to receive a
      UDP socket from the system server. This is being added
      for supporting UDP Encapsulation sockets for IPsec, which
      must be provided by the system.
      
      This is an analogous change to a previous change that
      permitted these sockets for untrusted_apps:
      0f75a62e
      
      Bug: 70389346
      Test: IpSecManagerTest, System app verified with SL4A
      Change-Id: Iec07e97012e0eab92a95fae9818f80f183325c31
      ee268643
  9. Jan 12, 2018
  10. Jan 11, 2018
    • Tom Cherry's avatar
      Add toolbox to vendor partition · b7255bf2
      Tom Cherry authored
      Bug: 71861796
      Test: no more denials on walleye for shell init scripts
      Change-Id: I51eab267c95a915f927b0aaa7db9d678a83093c7
      b7255bf2
    • Holly Jiuyu Sun's avatar
      Add EuiccCardManager and EuiccCardController. · d41ec0ed
      Holly Jiuyu Sun authored
      Bug: 38206971
      Test: test on phone
      Change-Id: Id34ab2673c7a16744fba77eb5c176e2e8b474299
      Merged-In: Id34ab2673c7a16744fba77eb5c176e2e8b474299
      d41ec0ed
    • Jeff Vander Stoep's avatar
      relabel files in /proc/net/xt_qtaguid/ · 43303c8b
      Jeff Vander Stoep authored
      /proc/net/xt_qtaguid is used by apps to track their network data
      use. Limit access to just zygote spawned processes - apps and
      system_server, omitting access to isolated_app which is not allowed
      to create network sockets.
      As Android moves to eBPF for app's network data stats, access to
      /proc/net/xt_qtaguid will be removed entirely. Segmenting access off
      is the first step.
      Bug: 68774956
      
      This change also helps further segment and whitelist access to
      files in /proc/net and is a step in the lockdown of /proc/net.
      Bug: 9496886
      
      Test: boot Taimen. Walk through setup-wizard. Make phone call and
          video call. Browse web. Watch youtube. Navigate in maps.
      Test: cts-tradefed run cts -m CtsAppSecurityHostTestCases -t \
          android.appsecurity.cts.AppSecurityTests
      Test: cts-tradefed run cts -m CtsNativeNetTestCases
      Test: cts-tradefed run cts -m CtsIncidentHostTestCases -t \
          com.android.server.cts.NetstatsIncidentTest
      Test: cts-tradefed run cts -m CtsOsTestCases -t \
          android.os.cts.StrictModeTest
      Test: cts-tradefed run cts -m CtsNetTestCases -t \
          android.net.cts.TrafficStatsTest
      Test: cts-tradefed run cts -m CtsUsageStatsTestCases -t \
          android.app.usage.cts.NetworkUsageStatsTest
      Test: vts-tradefed run vts -m VtsQtaguidTest
      Change-Id: Idddd318c56b84564142d37b11dcc225a2f2800ea
      43303c8b
  11. Jan 10, 2018
    • Jeff Vander Stoep's avatar
      vold_prepare_subdirs: grant chown · bdbdb0f2
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { chown } for comm="vold_prepare_su" capability=0
      scontext=u:r:vold_prepare_subdirs:s0
      tcontext=u:r:vold_prepare_subdirs:s0 tclass=capability
      
      Bug: 71796118
      Test: build
      Change-Id: I64b2f1ad8d6e0748c5820b8a37a4fc4f4101d1fb
      bdbdb0f2
    • Jeff Vander Stoep's avatar
      statsd: annotate boot denials · 79867779
      Jeff Vander Stoep authored
      Point logspam to its owner.
      
      Bug: 71537285
      Test: build
      Change-Id: I9db561ee6f2857214b7945b312e6d303630724ea
      79867779
    • Jaekyun Seok's avatar
      Whitelist exported platform properties · e4971454
      Jaekyun Seok authored
      This CL lists all the exported platform properties in
      private/exported_property_contexts.
      
      Additionally accessing core_property_type from vendor components is
      restricted.
      Instead public_readable_property_type is used to allow vendor components
      to read exported platform properties, and accessibility from
      vendor_init is also specified explicitly.
      
      Note that whitelisting would be applied only if
      PRODUCT_COMPATIBLE_PROPERTY is set on.
      
      Bug: 38146102
      Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
      Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
      e4971454
    • yro's avatar
      Update statsd sepolicies to avoid selinux violations during cts tests · e27af27f
      yro authored
      and pulling metrics
      
      Bug: 63757906
      Test: manual testing conducted
      Change-Id: Ieba524ee676dfb4a457d39d025d203bf02a70831
      e27af27f
    • Primiano Tucci's avatar
      Perfetto SELinux policies · c80f9e03
      Primiano Tucci authored
      Perfetto is a performance instrumentation and logging framework,
      living in AOSP's /external/pefetto.
      Perfetto introduces in the system one binary and two daemons
      (the binary can specialize in either depending on the cmdline).
      
      1) traced: unprivileged daemon. This is architecturally similar to logd.
         It exposes two UNIX sockets:
         - /dev/socket/traced_producer : world-accessible, allows to stream
           tracing data. A tmpfs file descriptor is sent via SCM_RIGHTS
           from traced to each client process, which needs to be able to
           mmap it R/W (but not X)
         - /dev/socket/traced_consumer : privilege-accessible (only from:
           shell, statsd). It allows to configure tracing and read the trace
           buffer.
      2) traced_probes: privileged daemon. This needs to:
         - access tracingfs (/d/tracing) to turn tracing on and off.
         - exec atrace
         - connect to traced_producer to stream data to traced.
      
      init.rc file:
      https://android-review.googlesource.com/c/platform/external/perfetto/+/575382/14/perfetto.rc
      
      Bug: 70942310
      Change-Id: Ia3b5fdacbd5a8e6e23b82f1d6fabfa07e4abc405
      c80f9e03
  12. Jan 09, 2018
Loading