Skip to content
Snippets Groups Projects
  1. Mar 15, 2017
    • Fyodor Kupolov's avatar
      Split preloads into media_file and data_file · b238fe66
      Fyodor Kupolov authored
      Untrusted apps should only access /data/preloads/media and demo directory.
      
      Bug: 36197686
      Test: Verified retail mode.
            Checked non-privileged APK cannot access /data/preloads
      Change-Id: I8e9c21ff6aba799aa31bf06893cdf60dafc04446
      b238fe66
  2. Mar 14, 2017
    • Alex Klyubin's avatar
      Switch Sensors HAL policy to _client/_server · 41518bec
      Alex Klyubin authored
      This switches Sensors HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Sensors HAL.
      
      Domains which are clients of Sensors HAL, such as system_server, are
      granted rules targeting hal_sensors only when the Sensors HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with clients
      talking to the HAL over HwBinder IPC), rules targeting hal_sensors are
      not granted to client domains.
      
      Domains which offer a binderized implementation of Sensors HAL, such
      as hal_sensors_default domain, are always granted rules targeting
      hal_sensors.
      
      P. S. This commit also removes
        allow system_server sensors_device:chr_file rw_file_perms
      because this is device-specific and thus not needed in device-agnostic
      policy. The device-specific policy of the affected devices already has
      this rule.
      
      Test: Device boots, no new denials
      Test: adb shell dumpsys sensorservice
            lists tons of sensors
      Test: Proprietary sensors test app indicates that there are sensors
            and that the app can register to listen for updates for sensors
            and that such updates arrive to the app.
      Bug: 34170079
      Change-Id: I61bf779070eabcb64ae73724d62b6e837319a668
      41518bec
  3. Mar 07, 2017
    • Yabin Cui's avatar
      Make /proc/sys/kernel/perf_event_max_sample_rate accessible to untrusted_app. · 5b15baeb
      Yabin Cui authored
      perf_event_max_sample_rate is needed to be read for native profiling,
      otherwise CTS test can fail on devices with kernel >= 4.4. Before this CL,
      the file is not readable from untrusted_app domain. This CL makes it readable
      from both shell domain and untrusted_app domain.
      
      Bug: http://b/35554543
      Test: build and test on marlin.
      Change-Id: Id118e06e3c800b70a749ab112e07a4ec24bb5975
      5b15baeb
    • Calin Juravle's avatar
      SElinux: Clean up code related to foreign dex use · 2b291121
      Calin Juravle authored
      We simplified the way we track whether or not a dex file is used by
      other apps. DexManager in the framework keeps track of the data and we
      no longer need file markers on disk.
      
      Test: device boots, foreign dex markers are not created anymore
      
      Bug: 32871170
      Change-Id: I464ed6b09439cf0342020ee07596f9aa8ae53b62
      2b291121
    • Roshan Pius's avatar
      sepolicy: Make wpa_supplicant a HIDL service · a976e64d
      Roshan Pius authored
      Note: The existing rules allowing socket communication will be removed
      once we  migrate over to HIDL completely.
      
      (cherry-pick of 2a9595ed) 
      Bug: 34603782
      Test: Able to connect to wifi networks.
      Test: Will be sending for full wifi integration tests
      (go/wifi-test-request)
      Change-Id: I9ee238fd0017ec330f6eb67ef9049211f7bd4615
      a976e64d
  4. Mar 06, 2017
    • Nick Kralevich's avatar
      Revert "Remove execmod support for newer API versions" · 9be90fb6
      Nick Kralevich authored
      We need more time to investigate the effect that this change will
      have on DRM solutions. Until the investigation is done, revert.
      
      This reverts commit 38d3eca0.
      
      Bug: 30146890
      Bug: 20013628
      Bug: 35323421
      Change-Id: I5ad69ef5ee12081ce7fc0a8440712f7f8f77cf16
      Test: policy compiles.
      9be90fb6
  5. Mar 05, 2017
  6. Mar 03, 2017
    • Keun-young Park's avatar
      allow dumpstate to collect ro.boottime.* · 43e8fae0
      Keun-young Park authored
      - necessary for analyzing early boot stage
      
      bug: 35949319
      Test: check captured bugreport for ro.boottime.* in SYSTEM PROPERTIES
      Change-Id: I8826abd19ac00f169841b4a7ceeb68be3405d1b9
      43e8fae0
    • Nick Kralevich's avatar
      Label /proc/misc · 50bb7b5a
      Nick Kralevich authored
      Label /proc/misc and allow access to untrusted_apps targeting older API
      versions, as well as update_engine_common.
      
      /proc/misc is used by some banking apps to try to detect if they are
      running in an emulated environment.
      
      TODO: Remove access to proc:file from update_engine_common after more
      testing.
      
      Bug: 35917228
      Test: Device boots and no new denials.
      Change-Id: If1b97a9c55a74cb74d1bb15137201ffb95b5bd75
      50bb7b5a
    • Roshan Pius's avatar
      sepolicy: Allow hal_wifi to set wlan driver status prop · e62805d7
      Roshan Pius authored
      The new wifi HAL manages the wlan driver and hence needs to be able to
      load/unload the driver. The "wlan.driver.status" is used to indicate the
      state of the driver to the rest of the system. There are .rc scripts for
      example which wait for the state of this property.
      
      Denials:
      03-01 13:31:43.394   476   476 W android.hardwar: type=1400
      audit(0.0:7243): avc: denied { read } for name="u:object_r:wifi_prop:s0"
      dev="tmpfs" ino=10578 scontext=u:r:hal_wifi_default:s0
      tcontext=u:object_r:wifi_prop:s0 tclass=file permissive=0
      03-01 13:31:43.399   476   476 E libc    : Access denied finding
      property "wlan.driver.status"
      
      Bug: 35765841
      Test: Denials no longer seen
      Change-Id: I502494af7140864934038ef51cb0326ba3902c63
      e62805d7
  7. Mar 02, 2017
    • Jeff Davidson's avatar
      Define selinux context for econtroller. · a203d37f
      Jeff Davidson authored
      Bug: 33075886
      Test: N/A
      Change-Id: I1654ee20fa6125cf3ed5c0796e85f289db5a9745
      a203d37f
    • Alex Klyubin's avatar
      Start locking down access to services from ephemeral apps · 6237d8b7
      Alex Klyubin authored
      This starts with the reduction in the number of services that
      ephemeral apps can access. Prior to this commit, ephemeral apps were
      permitted to access most of the service_manager services accessible
      by conventional apps. This commit reduces this set by removing access
      from ephemeral apps to:
      * gatekeeper_service,
      * sec_key_att_app_id_provider_service,
      * wallpaper_service,
      * wifiaware_service,
      * wifip2p_service,
      * wifi_service.
      
      Test: Device boots up fine, Chrome, Play Movies, YouTube, Netflix, work fine.
      Bug: 33349998
      Change-Id: Ie4ff0a77eaca8c8c91efda198686c93c3a2bc4b3
      6237d8b7
    • Chad Brubaker's avatar
      Use levelFrom=user for v2 apps · 6dc13ffc
      Chad Brubaker authored
      This is needed, at least short term
      
      Bug:34231507
      Test: Builds
      Change-Id: Id313c4f3e40c17b0eead50facf474a890cda5c85
      6dc13ffc
    • Hugo Benichi's avatar
      removing obsolete entries for connectivity_metrics_logger · ee0b8cd9
      Hugo Benichi authored
      Test: build, flashed, booted.
      Bug: 32648597
      Change-Id: Ife3d99293c3274ad3a62fb71ae3f799c74e853f4
      ee0b8cd9
  8. Mar 01, 2017
  9. Feb 28, 2017
    • Todd Poynor's avatar
      Add /data/misc/reboot and reboot_data_file context · 7290f633
      Todd Poynor authored
      Add a file context for keeping track of last reboot reason and label
      directory /data/misc/reboot/ for this purpose.
      
      (Cherry picked from commit ca051f6d)
      
      Bug: 30994946
      Test: manual: reboot ocmmand, setprop sys.powerctl, SoC thermal mgr
      Change-Id: I9569420626b4029a62448b3f729ecbbeafbc3e66
      7290f633
    • Chong Zhang's avatar
      MediaCAS: adding media.cas to service · 72916418
      Chong Zhang authored
      Also allow media.extractor to use media.cas for descrambling.
      
      bug: 22804304
      
      Change-Id: Id283b31badecb11011211a776ba9ff5167a9019d
      72916418
    • Steven Moreland's avatar
      Bluetooth hal: move to vendor partition. · ba1c5831
      Steven Moreland authored
      Bug: 35328775
      Test: works in both binderized and passthrough modes
      Merged-In: I1f827b4983e5e67c516e4488ad3497dd62db7e20
      Change-Id: I1f827b4983e5e67c516e4488ad3497dd62db7e20
      ba1c5831
  10. Feb 27, 2017
  11. Feb 24, 2017
    • Chia-I Wu's avatar
      Allow adbd to use graphics fds · 8585788d
      Chia-I Wu authored
      Bug: 35708449
      Test: AS screen capture
      Change-Id: I53f1604e1ee9c9b32c6932f1b8944708f5012e5f
      8585788d
    • mukesh agrawal's avatar
      allow WifiService to use tracing on user builds · 723364f1
      mukesh agrawal authored
      Previously, we'd restricted WifiService's use of
      the kernel's tracing feature to just userdebug_or_eng
      builds.
      
      This restriction was in place because the feature
      had not yet been reviewed from a privacy perspective.
      Now that the feature has passed privacy review, enable
      the feature on all builds.
      
      Note that other safeguards remain in place (on all
      builds):
      - The set of events to be monitored is configured by
        init, rather than WifiService (part of system_server).
        This privilege separation prevents a compromised
        system_server from tracing additional information.
      - The trace events are kept only in RAM, until/unless
        WifiService receives a dump request. (This would happen,
        for example, in the case of adb dumpsys, or generating
        a bugreport.)
      
      Bug: 35679234
      Test: manual (see below)
      
      Manual test details:
      - flash device
      - connect device to a wifi network
      $ adb shell dumpsys wifi | grep rdev_connect
        [should see at least one matching line]
      
      Change-Id: I85070054857d75177d0bcdeb9b2c95bfd7e3b6bc
      723364f1
    • Amit Mahajan's avatar
      Move rild to vendor partition. · f7bed71a
      Amit Mahajan authored
      Test: Basic telephony sanity
      Bug: 35672432
      Change-Id: I7d17cc7efda9902013c21d508cefc77baccc06a8
      f7bed71a
  12. Feb 23, 2017
    • Luis Hector Chavez's avatar
      Restrict /proc/sys/vm/mmap_rnd_bits · 64a05038
      Luis Hector Chavez authored
      Label /proc/sys/vm/mmap_rnd_bits so it is only readable and writable by
      init. This also tightens the neverallow restrictions for proc_security.
      
      Bug: 33563834
      Test: run cts -m CtsPermissionTestCases -t \
            android.permission.cts.FileSystemPermissionTest#testProcfsMmapRndBitsExistsAndSane
      
      Change-Id: Ie7af39ddbf23806d4ffa35e7b19d30fec7b6d410
      64a05038
    • Jeff Vander Stoep's avatar
      app: remove logspam on ion ioctls · ebbbe6dd
      Jeff Vander Stoep authored
      Apps definitely need access to ion ioctls. Remove audit statement.
      
      Test: build marlin
      Bug: 35715385
      Change-Id: I777d3e9a88065a5f711315a7da6d63587744b408
      ebbbe6dd
  13. Feb 22, 2017
    • Alex Klyubin's avatar
      Switch Wi-Fi HAL policy to _client/_server · 1d2a1476
      Alex Klyubin authored
      This switches Wi-Fi HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Wi-Fi HAL.
      
      Domains which are clients of Wi-Fi HAL, such as system_server domain,
      are granted rules targeting hal_wifi only when the Wi-Fi HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with clients
      talking to the HAL over HwBinder IPC), rules targeting hal_wifi are
      not granted to client domains.
      
      Domains which offer a binderized implementation of Wi-Fi HAL, such as
      hal_wifi_default domain, are always granted rules targeting hal_wifi.
      
      Test: Setup Wizard (incl. adding a Google Account) completes fine with
            Wi-Fi connectivity only
      Test: Toggle Wi-Fi off, on, off, on
      Test: Use System UI to see list of WLANs and connect to one which does
            not require a password, and to one which requries a PSK
      Test: ip6.me loads fine in Chrome over Wi-Fi
      Bug: 34170079
      
      Change-Id: I7a216a06727c88b7f2c23d529f67307e83bed17f
      1d2a1476
    • Myles Watson's avatar
      Allow the Bluetooth HAL to toggle rfkill · 20b8d6b9
      Myles Watson authored
      Bug: 35657600
      Test: user build of Marlin starts with BT
      Change-Id: Ic2380da66467b9b1c385da7d7fa10fddf4c7fae1
      20b8d6b9
    • Mårten Kongstad's avatar
      Add service 'overlay' to service_contexts · e096e5f5
      Mårten Kongstad authored
      
      The 'overlay' service is the Overlay Manager Service, which tracks
      packages and their Runtime Resource Overlay overlay packages.
      
      Change-Id: I897dea6a32c653d31be88a7b3fc56ee4538cf178
      Co-authored-by: default avatarMartin Wallgren <martin.wallgren@sonymobile.com>
      Signed-off-by: default avatarZoran Jovanovic <zoran.jovanovic@sonymobile.com>
      Bug: 31052947
      Test: boot the Android framework
      e096e5f5
    • Jeff Vander Stoep's avatar
      Allow all untrusted_apps to create ptys · d1524251
      Jeff Vander Stoep authored
      Bug: 35632346
      Test: build and boot aosp_marlin
      Change-Id: Ia2d019b0160e9b512f3e3a70ded70504fe4fea0c
      d1524251
    • Alex Klyubin's avatar
      Switch Fingerprint HAL policy to _client/_server · f98650e4
      Alex Klyubin authored
      This switches Fingerprint HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Bluetooth HAL.
      
      Domains which are clients of Fingerprint HAL, such as system_server
      domain, are granted rules targeting hal_fingerprint only when the
      Fingerprint HAL runs in passthrough mode (i.e., inside the client's
      process). When the HAL runs in binderized mode (i.e., in another
      process/domain, with clients talking to the HAL over HwBinder IPC),
      rules targeting hal_fingerprint are not granted to client domains.
      
      Domains which offer a binderized implementation of Fingerprint HAL,
      such as hal_fingerprint_default domain, are always granted rules
      targeting hal_fingerprint.
      
      NOTE: This commit also removes unnecessary allow rules from
      Fingerprint HAL, such access to servicemanager (not hwservicemanager)
      and access to keystore daemon over Binder IPC. Fingerprint HAL does
      not use this functionality anyway and shouldn't use it either.
      
      Test: Enable fingerprint + PIN secure lock screen, confirm it unlocks
            with fingerprint or PIN
      Test: Disable PIN (and thus fingerprint) secure lock screen
      Test: make FingerprintDialog, install, make a fake purchase
      Test: Add fingerprint_hidl_hal_test to device.mk, build & add to device,
            adb shell stop,
            adb shell /data/nativetest64/fingerprint_hidl_hal_test/fingerprint_hidl_hal_test -- all tests pass
      Bug: 34170079
      
      Change-Id: I6951c0f0640194c743ff7049357c77f5f21b71a1
      f98650e4
  14. Feb 21, 2017
    • Chad Brubaker's avatar
      Add new untrusted_v2_app domain · a782a816
      Chad Brubaker authored
      untrusted_v2_app is basically a refinement of untrusted_app with legacy
      capabilities removed and potentially backwards incompatible changes.
      
      This is not currently hooked up to anything.
      
      Bug: 33350220
      Test: builds
      Change-Id: Ic9fad57476bc2b6022b1eaca8667bf6d844753c2
      a782a816
  15. Feb 17, 2017
    • Alex Klyubin's avatar
      Switch DRM HAL policy to _client/_server · 9b718c40
      Alex Klyubin authored
      This switches DRM HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of DRM HAL.
      
      Domains which are clients of DRM HAL, such as mediadrmserver domain,
      are granted rules targeting hal_drm only when the DRM HAL runs in
      passthrough mode (i.e., inside the client's process). When the HAL
      runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting hal_drm
      are not granted to client domains.
      
      Domains which offer a binderized implementation of DRM HAL, such as
      hal_drm_default domain, are always granted rules targeting hal_drm.
      
      Test: Play movie using Google Play Movies
      Test: Play movie using Netflix
      Bug: 34170079
      Change-Id: I3ab0e84818ccd61e54b90f7ade3509b7dbf86fb9
      9b718c40
    • Nick Kralevich's avatar
      Add documentation on neverallow rules · 38c12828
      Nick Kralevich authored
      Better document the reasons behind the neverallow for tcp/udp sockets.
      
      Test: policy compiles.
      Change-Id: Iee386af3be6fc7495addc9300b5628d0fe61c8e9
      38c12828
    • Steven Moreland's avatar
      android.hidl.memory -> android.hidl.allocator · 33fb0a98
      Steven Moreland authored
      Test: hidl_test, device boots with allocator
      Bug: 35327976
      
      Merged-In: I6232a2823ff16058c70f173ec2332772048563f4
      Change-Id: I6232a2823ff16058c70f173ec2332772048563f4
      33fb0a98
    • Alex Klyubin's avatar
      Switch Bluetooth HAL policy to _client/_server · 168435fe
      Alex Klyubin authored
      This switches Bluetooth HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Bluetooth HAL.
      
      Domains which are clients of Bluetooth HAL, such as bluetooth domain,
      are granted rules targeting hal_bluetooth only when the Bluetooth HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_bluetooth are not granted to client domains.
      
      Domains which offer a binderized implementation of Bluetooth HAL, such
      as hal_bluetooth_default domain, are always granted rules targeting
      hal_bluetooth.
      
      Test: Toggle Bluetooth off and on
      Test: Pair with another Android, and transfer a file to that Android
            over Bluetooth
      Test: Pair with a Bluetooth speaker, play music through that
            speaker over Bluetooth
      Test: Add bluetooth_hidl_hal_test to device.mk, build & add to device,
            adb shell stop,
            adb shell /data/nativetest64/bluetooth_hidl_hal_test/bluetooth_hidl_hal_test
      Bug: 34170079
      Change-Id: I05c3ccf1e98cbbc1450a81bb1000c4fb75eb8a83
      168435fe
  16. Feb 16, 2017
    • Nick Kralevich's avatar
      Label /proc/config.gz · 929da014
      Nick Kralevich authored
      Add a label to /proc/config.gz, so we can distinguish this file from
      other /proc files in security policy.
      
      For now, only init is allowed read access. All others are denied.
      TODO: clarify exactly who needs access. Further access will be granted
      in a future commit.
      
      Bug: 35126415
      Test: policy compiles and no device boot problems.
      Change-Id: I8b480890495ce5b8aa3f8c7eb00e14159f177860
      929da014
    • Nick Kralevich's avatar
      Remove crash_dump from sys_ptrace neverallow exception · d419ed8f
      Nick Kralevich authored
      CAP_SYS_PTRACE is no longer used by crash_dump. There's no reason to
      exclude it from the neverallow compile time assertion.
      
      Test: policy compiles.
      Change-Id: Ib2dced19091406553c16e6ce538cfb68bbc1e5aa
      d419ed8f
  17. Feb 15, 2017
    • Eino-Ville Talvala's avatar
      System server: Allow get/setsched to hal_camera domain. · 6d9be831
      Eino-Ville Talvala authored
      Much like audio, the camera HAL may need to have key threads running
      in SCHED_FIFO or similar priority.  Allow system_server to raise
      thread priority for camera HALs to make this possible.
      
      Test: Video recording works, with EIS. No logspam about EIS failure.
      Bug: 35389145
      Change-Id: I1d92f9f10dc3aff22ce56b8b9cc57db043631919
      6d9be831
    • Alex Klyubin's avatar
      Use _client and _server for Audio HAL policy · ac2b4cd2
      Alex Klyubin authored
      This starts the switch for HAL policy to the approach where:
      * domains which are clients of Foo HAL are associated with
        hal_foo_client attribute,
      * domains which offer the Foo HAL service over HwBinder are
        associated with hal_foo_server attribute,
      * policy needed by the implementation of Foo HAL service is written
        against the hal_foo attribute. This policy is granted to domains
        which offer the Foo HAL service over HwBinder and, if Foo HAL runs
        in the so-called passthrough mode (inside the process of each
        client), also granted to all domains which are clients of Foo HAL.
        hal_foo is there to avoid duplicating the rules for hal_foo_client
        and hal_foo_server to cover the passthrough/in-process Foo HAL and
        binderized/out-of-process Foo HAL cases.
      
      A benefit of associating all domains which are clients of Foo HAL with
      hal_foo (when Foo HAL is in passthrough mode) is that this removes the
      need for device-specific policy to be able to reference these domains
      directly (in order to add device-specific allow rules). Instead,
      device-specific policy only needs to reference hal_foo and should no
      longer need to care which particular domains on the device are clients
      of Foo HAL. This can be seen in simplification of the rules for
      audioserver domain which is a client of Audio HAL whose policy is
      being restructured in this commit.
      
      This commit uses Audio HAL as an example to illustrate the approach.
      Once this commit lands, other HALs will also be switched to this
      approach.
      
      Test: Google Play Music plays back radios
      Test: Google Camera records video with sound and that video is then
            successfully played back with sound
      Test: YouTube app plays back clips with sound
      Test: YouTube in Chrome plays back clips with sound
      Bug: 34170079
      Change-Id: I2597a046753edef06123f0476c2ee6889fc17f20
      ac2b4cd2
Loading