• Vlad Tsyrklevich's avatar
    GWP-ASan: Add PartitionAlloc client hooks · 20e6edd5
    Vlad Tsyrklevich authored
    Add sampling shims for PartitionAlloc allocations to the GWP-ASan
    client. One of PartitionAlloc's core security guaranteees is that
    allocations with different types are always segregated in memory so that
    use-after-frees can only be exploited within a given partition.
    
    For now I have not yet taught the GuardedPageAllocator about types,
    instead I only allow allocating every page a single time so that no two
    allocations overlap to ensure this property. This is sufficient for a
    prototype to test in-the-wild but will need to be fixed before enabling
    widely.
    
    Crash handler support and wiring into chrome/ will follow.
    
    Bug: 956824
    Change-Id: If98f6ca2b6aa9d8ffc1d5300e319d0c38c71458b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597192
    Auto-Submit: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
    Reviewed-by: default avatarVitaly Buka <vitalybuka@chromium.org>
    Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#657097}
    20e6edd5
sampling_partitionalloc_shims.cc 3.19 KB