Skip to content
Snippets Groups Projects
  • Nick Kralevich's avatar
    drop priv_app app_data_file:file execute; · e1ddd741
    Nick Kralevich authored
    system/sepolicy commit 23c9d91b
    introduced a new type called privapp_data_file. This type is used to
    label priv-app's /home files. For backwards compatibility, priv-app
    rules involving normal app_data_files were preserved. Subsequently,
    system/sepolicy commit 5d175519
    assigned the file label privapp_data_file to /home files owned
    by priv-apps.
    
    Because of the previous labeling of priv-app data files, priv-apps were
    granted the ability to mmap(PROT_EXEC) any other app's /home files,
    regardless of how trustworthy or untrustworthy those files were. Commit
    23c9d91b preserved the status quo.
    However, now that we have a more refined label for priv-app /home files,
    we no longer need to be as permissive.
    
    Drop the ability for priv-apps to map executable code from
    untrusted_apps home directories. "execute" is removed in this change,
    and "execute_no_trans" was previously removed in commit
    8fb4cb8b. Add a neverallow assertion
    (compile time assertion + CTS test) to prevent regressions.
    
    Further clarify why we need to support priv-apps loading executable code
    from their own home directories, at least for now. b/112037137 covers
    further tightening we can do in this area.
    
    Bug: 112357170
    Test: Device boots and no problems.
    Change-Id: Ia6a9eb4c2ed8a02ad45644d025181ba3c8424cda
    e1ddd741