Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
35b5499d |
| 13-Jan-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
Reland: [GWP-ASan] Add recoverable mode.
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan
Reland: [GWP-ASan] Add recoverable mode.
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan now has APIs that a signal handler (like the example optional crash handler) can call in order to allow the continuation of a process.
When an error occurs with an allocation, the slot used for that allocation will be permanently disabled. This means that free() of that pointer is a no-op, and use-after-frees will succeed (writing and reading the data present in the page).
For heap-buffer-overflow/underflow, the guard page is marked as accessible and buffer-overflows will succeed (writing and reading the data present in the now-accessible guard page). This does impact adjacent allocations, buffer-underflow and buffer-overflows from adjacent allocations will no longer touch an inaccessible guard page. This could be improved in future by having two guard pages between each adjacent allocation, but that's out of scope of this patch.
Each allocation only ever has a single error report generated. It's whatever came first between invalid-free, double-free, use-after-free or heap-buffer-overflow, but only one.
Reviewed By: eugenis, fmayer
Differential Revision: https://reviews.llvm.org/D140173
show more ...
|
#
7cc12cb6 |
| 12-Jan-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
Revert "[GWP-ASan] Add recoverable mode."
This reverts commit 90a9beb7cc9755791caa23dfc4e36bc544e98ed3.
Reason: Broke an internal build.
|
Revision tags: llvmorg-15.0.7 |
|
#
90a9beb7 |
| 11-Jan-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Add recoverable mode.
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan now has
[GWP-ASan] Add recoverable mode.
The GWP-ASan recoverable mode allows a process to continue to function after a GWP-ASan error is detected. The error will continue to be dumped, but GWP-ASan now has APIs that a signal handler (like the example optional crash handler) can call in order to allow the continuation of a process.
When an error occurs with an allocation, the slot used for that allocation will be permanently disabled. This means that free() of that pointer is a no-op, and use-after-frees will succeed (writing and reading the data present in the page).
For heap-buffer-overflow/underflow, the guard page is marked as accessible and buffer-overflows will succeed (writing and reading the data present in the now-accessible guard page). This does impact adjacent allocations, buffer-underflow and buffer-overflows from adjacent allocations will no longer touch an inaccessible guard page. This could be improved in future by having two guard pages between each adjacent allocation, but that's out of scope of this patch.
Each allocation only ever has a single error report generated. It's whatever came first between invalid-free, double-free, use-after-free or heap-buffer-overflow, but only one.
Reviewed By: eugenis, fmayer
Differential Revision: https://reviews.llvm.org/D140173
show more ...
|
#
dcf23e13 |
| 10-Jan-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Fix up bad report for in-page underflow w/ UaF
Complex scenario, but reports when there's both a use-after-free and buffer-underflow that is in-page (i.e. doesn't touch the guard page) en
[GWP-ASan] Fix up bad report for in-page underflow w/ UaF
Complex scenario, but reports when there's both a use-after-free and buffer-underflow that is in-page (i.e. doesn't touch the guard page) ended up generating a pretty bad report:
'Use After Free at 0x7ff392e88fef (18446744073709551615 bytes into a 1-byte allocation at 0x7ff392e88ff0) by thread 3836722 here:'
(note the 2^64-bytes-into-alloc, very cool and good!)
Fix up that case, and add a diagnostic about when you have both a use-after-free and a buffer-overflow that it's probably a bogus report (assuming the developer didn't *really* screw up and have a uaf+overflow bug at the same time).
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D139885
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
3d8823b8 |
| 08-Feb-2021 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Add aligned allocations.
Adds a new allocation API to GWP-ASan that handles size+alignment restrictions.
Reviewed By: cryptoad, eugenis
Differential Revision: https://reviews.llvm.org/D
[GWP-ASan] Add aligned allocations.
Adds a new allocation API to GWP-ASan that handles size+alignment restrictions.
Reviewed By: cryptoad, eugenis
Differential Revision: https://reviews.llvm.org/D94830
show more ...
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
#
0dcf3324 |
| 02-Feb-2021 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
Revert "[GWP-ASan] Add aligned allocations."
This reverts commit 9dc06762470cb5a6cde8de5833cb75262e1bacb0.
Should not have been committed, was a bad rebase. Review still continuing on D94830.
|
Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
#
9dc06762 |
| 14-Jan-2021 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Add aligned allocations.
Adds a new allocation API to GWP-ASan that handles size+alignment restrictions.
Differential Revision: https://reviews.llvm.org/D94830
|
Revision tags: llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
61a038f8 |
| 10-Dec-2020 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] IWYU & clang-format
Run an IWYU pass and clang-format GWP-ASan code.
Reviewed By: eugenis, mcgrathr
Differential Revision: https://reviews.llvm.org/D92688
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
ae9d0400 |
| 19-Oct-2020 |
Kostya Kortchinsky <kostyak@google.com> |
[GWP-ASan] Cleanup (NFC)
Cleaning up some of the GWP-ASan code base: - lots of headers didn't have the correct file name - adding `#ifdef` guard to `utilities.h` - correcting an `#ifdef` guard based
[GWP-ASan] Cleanup (NFC)
Cleaning up some of the GWP-ASan code base: - lots of headers didn't have the correct file name - adding `#ifdef` guard to `utilities.h` - correcting an `#ifdef` guard based on actual file name - removing an extra `;` - clang-format'ing the code (`-style=llvm`)
Differential Revision: https://reviews.llvm.org/D89721
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
d19af2f2 |
| 27-Jul-2020 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Crash handler API returns sizeof(collected trace)
Summary: Fix up a slight bug with the crash handler API, where we say that we return the size of the collected trace (instead of the size
[GWP-ASan] Crash handler API returns sizeof(collected trace)
Summary: Fix up a slight bug with the crash handler API, where we say that we return the size of the collected trace (instead of the size of the trace that's returned) when the return buffer is too small, and the result is truncated.
Also, as a result, patch up a small uninitialized memory bug.
Reviewers: morehouse, eugenis
Reviewed By: eugenis
Subscribers: #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D84652
show more ...
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2 |
|
#
0bfc4890 |
| 06-Feb-2020 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Fix unused variables from crash handler + clang-format
Summary: NFC - See title
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: merge_guards_bot, #sanitizers, llvm-commits
Tags:
[GWP-ASan] Fix unused variables from crash handler + clang-format
Summary: NFC - See title
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: merge_guards_bot, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D74100
show more ...
|
#
a6258684 |
| 05-Feb-2020 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
[GWP-ASan] Crash Handler API.
Summary: Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and le
[GWP-ASan] Crash Handler API.
Summary: Forewarning: This patch looks big in #LOC changed. I promise it's not that bad, it just moves a lot of content from one file to another. I've gone ahead and left inline comments on Phabricator for sections where this has happened.
This patch: 1. Introduces the crash handler API (crash_handler_api.h). 2. Moves information required for out-of-process crash handling into an AllocatorState. This is a trivially-copied POD struct that designed to be recovered from a deceased process, and used by the crash handler to create a GWP-ASan report (along with the other trivially-copied Metadata struct). 3. Implements the crash handler API using the AllocatorState and Metadata. 4. Adds tests for the crash handler. 5. Reimplements the (now optionally linked by the supporting allocator) in-process crash handler (i.e. the segv handler) using the new crash handler API. 6. Minor updates Scudo & Scudo Standalone to fix compatibility. 7. Changed capitalisation of errors (e.g. /s/Use after free/Use After Free).
Reviewers: cryptoad, eugenis, jfb
Reviewed By: eugenis
Subscribers: merge_guards_bot, pcc, jfb, dexonsmith, mgorny, cryptoad, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D73557
show more ...
|