Skip to content
Snippets Groups Projects
  • Jeff Vander Stoep's avatar
    74434848
    Grant additional permissions for ASAN builds · 74434848
    Jeff Vander Stoep authored
    ASAN builds may require additional permissions to launch processes
    with ASAN wrappers. In this case, system_server needs permission to
    execute /system/bin/sh.
    
    Create with_asan() macro which can be used exclusively on debug
    builds. Note this means that ASAN builds with these additional
    permission will not pass the security portion of CTS - like any
    other debug build.
    
    Addresses:
    avc: denied { execute } for name="sh" dev="dm-0" ino=571
    scontext=u:r:system_server:s0 tcontext=u:object_r:shell_exec:s0
    tclass=file
    
    Test: lunch aosp_marlin-userdebug;
          cd system/sepolicy; mm SANITIZE_TARGET=address;
          Verify permissions granted using with_asan() are granted.
    Test: lunch aosp_marlin-userdebug;
          cd system/sepolicy; mm;
          Verify permissions granted using with_asan() are not granted.
    Test: lunch aosp_marlin-user;
          cd system/sepolicy; mm SANITIZE_TARGET=address;
          Verify permissions granted using with_asan() are not granted.
    Bug: 36138508
    Change-Id: I6e39ada4bacd71687a593023f16b45bc16cd7ef8
    74434848
    History
    Grant additional permissions for ASAN builds
    Jeff Vander Stoep authored
    ASAN builds may require additional permissions to launch processes
    with ASAN wrappers. In this case, system_server needs permission to
    execute /system/bin/sh.
    
    Create with_asan() macro which can be used exclusively on debug
    builds. Note this means that ASAN builds with these additional
    permission will not pass the security portion of CTS - like any
    other debug build.
    
    Addresses:
    avc: denied { execute } for name="sh" dev="dm-0" ino=571
    scontext=u:r:system_server:s0 tcontext=u:object_r:shell_exec:s0
    tclass=file
    
    Test: lunch aosp_marlin-userdebug;
          cd system/sepolicy; mm SANITIZE_TARGET=address;
          Verify permissions granted using with_asan() are granted.
    Test: lunch aosp_marlin-userdebug;
          cd system/sepolicy; mm;
          Verify permissions granted using with_asan() are not granted.
    Test: lunch aosp_marlin-user;
          cd system/sepolicy; mm SANITIZE_TARGET=address;
          Verify permissions granted using with_asan() are not granted.
    Bug: 36138508
    Change-Id: I6e39ada4bacd71687a593023f16b45bc16cd7ef8