Skip to content
Snippets Groups Projects
  1. Aug 13, 2018
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
      b90595cb
    • Treehugger Robot's avatar
      ad3eb4e2
    • Nick Kralevich's avatar
      Revert "Change priv-apps /home/home labels to privapp_data_file" · cdc6649a
      Nick Kralevich authored
      There is a problem with on-disk labeling of files created by secondary
      dex background compilation which is causing unexpected denials to show
      up. Restore the old labeling until we are able to fix the underlying
      problem.
      
      Steps to reproduce:
        1) boot android device.
        2) adb root
        3) Run cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms
        4) Examine the files in /data/user_de/0/com.google.android.gms
      Expected:
        All files have the label privapp_data_file
      Actual:
        The files in /data/user_de/0/com.google.android.gms/app_chimera/m
        are labeled "app_data_file", not "privapp_data_file".
      
      This reverts commit 4df57822.
      
      Bug: 112357170
      Test: policy compiles
      Change-Id: I38ba75c92c9c46e6a1fdbc02e3dc80c63adccaa8
      cdc6649a
    • Nick Kralevich's avatar
      Revert "auditallow app_data_file execute" · c47e149a
      Nick Kralevich authored
      There is a problem with on-disk labeling of files created by secondary
      dex background compilation which is causing unexpected denials to show
      up. Drop the auditallow rule to avoid logspam.
      
      Steps to reproduce:
        1) boot android device.
        2) adb root
        3) Run cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms
        4) Examine the files in /data/user_de/0/com.google.android.gms
      Expected:
        All files have the label privapp_data_file
      Actual:
        The files in /data/user_de/0/com.google.android.gms/app_chimera/m
        are labeled "app_data_file", not "privapp_data_file".
      
      Addresses the following audit logspam:
        type=1400 audit(0.0:117): avc: granted { execute } for comm=4173796E635461736B202331 path="/data/user_de/0/com.google.android.gms/app_chimera/m/00000002/oat/arm/DynamiteLoader.odex" dev="dm-0" ino=5775 scontext=u:r:untrusted_app:s0:c111,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=com.android.chrome
      
      Additionally, this removes auditallow statements for older untrusted
      apps. Lots of big apps are executing files from their home directory.
      Additional restrictions in this area will need to be tied to API
      versions.
      
      Addresses the following audit logspam:
        type=1400 audit(0.0:619): avc: granted { execute } for comm="na:notification" path="/data/data/com.facebook.katana/lib-xzs/libbreakpad.so" dev="dm-3" ino=28333 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=com.facebook.katana
        type=1400 audit(0.0:129): avc: granted { execute } for comm="ticlock" path="/data/data/is.shortcut/files/ticlock/ticlock" dev="dm-3" ino=58614 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=is.shortcut
        type=1400 audit(0.0:1239): avc: granted { execute } for comm="Analytics-Norma" path="/data/data/com.facebook.orca/lib-xzs/libchipsetmerged.so" dev="dm-3" ino=50243 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=com.facebook.orca
        type=1400 audit(0.0:58): avc: granted { execute_no_trans } for comm="sh" path="/data/data/is.shortcut/files/ticlock/ticlock" dev="dm-3" ino=58614 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=is.shortcut
        type=1400 audit(0.0:1948): avc: granted { execute_no_trans } for comm="sh" path="/data/data/com.mxdata.tube.Market/files/osmcore" dev="sda13" ino=2752651 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=com.mxdata.tube.Market
        type=1400 audit(0.0:2875): avc: granted { execute_no_trans } for comm="ThreadPoolManag" path="/data/data/com.amazon.kindle/files/hardwareTest" dev="sda13" ino=1935346 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file app=com.amazon.kindle
      
      This reverts commit 4738b93d.
      
      Bug: 112357170
      Test: policy compiles
      c47e149a
    • Nick Kralevich's avatar
      suppress some su related denials · 690be8e8
      Nick Kralevich authored
      The su domain is always permissive. Operations which occur in this
      domain should never be logged.
      
      Addresses the following denials:
      
        type=1400 audit(0.0:864): avc: denied { module_load } for comm="insmod" path="/data/lcd.ko.gz" dev="sda21" ino=143150 scontext=u:r:su:s0 tcontext=u:object_r:system_data_file:s0 tclass=system permissive=1
        type=1400 audit(0.0:858): avc: denied { module_load } for comm="insmod" path="/vendor/lib/modules/lcd.ko" dev="sda9" ino=880 scontext=u:r:su:s0 tcontext=u:object_r:vendor_file:s0 tclass=system permissive=1
        type=1400 audit(0.0:37495): avc: denied { prog_run } for comm="ip6tables" scontext=u:r:su:s0 tcontext=u:r:bpfloader:s0 tclass=bpf permissive=1
        type=1400 audit(0.0:31): avc: denied { map_create } for comm="netd_unit_test" scontext=u:r:su:s0 tcontext=u:r:su:s0 tclass=bpf permissive=1
        type=1400 audit(0.0:32): avc: denied { map_read map_write } for comm="netd_unit_test" scontext=u:r:su:s0 tcontext=u:r:su:s0 tclass=bpf permissive=1
      
      Test: policy compiles
      Change-Id: I490c8566577fde64bdd0201bb8f9112ff6ac96d4
      690be8e8
    • Nick Kralevich's avatar
      more mmaps · bedfb22a
      Nick Kralevich authored
      Linux kernel 4.14+ SELinux starts explicit map
      permission check for file mmap operations. For backards
      compat, add mmap in more places where we explicitly
      list out individual file permissions.
      
      Test: policy compiles
      Change-Id: Idc4ca53769f2e7aa12ed93ab27191ed92da37a3e
      bedfb22a
  2. Aug 10, 2018
  3. Aug 09, 2018
  4. Aug 08, 2018
  5. Aug 07, 2018
  6. Aug 06, 2018
  7. Aug 04, 2018
  8. Aug 03, 2018
    • Sudheer Shanka's avatar
      Merge "Allow vold to mount at /mnt/user/.*" · 19e85dfb
      Sudheer Shanka authored
      am: c5601de4
      
      Change-Id: Ie61645bd9b276f67e96ac7f823c1a1048a35ef8e
      19e85dfb
    • Tom Cherry's avatar
      Allow init to execute services marked with seclabel u:r:su:s0 in userdebug/eng · 5f49b6a2
      Tom Cherry authored
      am: 938ab05d
      
      Change-Id: If632608a9e7acc6e59b468674207bc80a4833a26
      5f49b6a2
    • Tom Cherry's avatar
      Second stage init is on system · 2faf4854
      Tom Cherry authored
      Test: boot hikey
      Change-Id: I8f26f858af8ccde1d7f4b346966bbb6bbeab5a92
      2faf4854
    • Sudheer Shanka's avatar
      c5601de4
    • Nick Kralevich's avatar
      Change priv-apps /home/home labels to privapp_data_file · 4df57822
      Nick Kralevich authored
      Currently, both untrusted apps and priv-apps use the SELinux file label
      "app_data_file" for files in their /data/data directory. This is
      problematic, as we really want different rules for such files. For
      example, we may want to allow untrusted apps to load executable code
      from priv-app directories, but disallow untrusted apps from loading
      executable code from their own home directories.
      
      Commit 23c9d91b introduced a new type
      called privapp_data_file and added rules necessary to preserve
      compatibility. However, that change did not relabel any existing files,
      so effectively the change was a no-op.
      
      This change performs the switch, relabeling priv-app's /data/data files
      from app_data_file to privapp_data_file. Due to the compatibility rules
      added in 23c9d91b, there should be no
      noticeable effect from this change.
      
      Test: Factory reset and boot - no problems on fresh install.
      Test: Upgrade to new version and test. No compatibility problems on
            filesystem upgrade.
      
      Merged-In: I9a476726bf01f4bcc7952d11fd57dba803a9fd8d
      Change-Id: I23a26cd3906fc43cbd225c05c3a2abd3cab8bd06
      4df57822
Loading