-
Notifications
You must be signed in to change notification settings - Fork 11
Fix another hidden use-after-free in CallTraceStorage #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7c08229 to
a3a068e
Compare
Benchmarks [x86_64 cpu]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 12 metrics, 22 unstable metrics.
|
Benchmarks [x86_64 alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 13 metrics, 23 unstable metrics.
|
Benchmarks [aarch64 wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 14 metrics, 20 unstable metrics.
|
Benchmarks [aarch64 cpu]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 13 metrics, 22 unstable metrics.
|
Benchmarks [aarch64 cpu,wall,alloc,memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 20 unstable metrics.
|
Benchmarks [x86_64 wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 5 performance regressions! Performance is the same for 8 metrics, 25 unstable metrics.
|
Benchmarks [aarch64 cpu,wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 20 unstable metrics.
|
Benchmarks [aarch64 memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 13 metrics, 21 unstable metrics.
|
Benchmarks [aarch64 alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 13 metrics, 21 unstable metrics.
|
Benchmarks [x86_64 memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 12 metrics, 23 unstable metrics.
|
Benchmarks [x86_64 cpu,wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 11 metrics, 23 unstable metrics.
|
Benchmarks [x86_64 memleak,alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 12 metrics, 24 unstable metrics.
|
Benchmarks [x86_64 cpu,wall,alloc,memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 10 metrics, 24 unstable metrics.
|
Benchmarks [aarch64 memleak,alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 14 metrics, 21 unstable metrics.
|
rkennke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
(cherry picked from commit e800295)
What does this PR do?:
Here we address the (almost certain) last use-after-free bug in
CallTraceStorageimplementationAdditional Notes:
The gist of the fix is to make the
LinearAllocatorcleanup 2-phased - first just reset the allocator to start handing out new chunks and actually deallocate the previously used chunks only when it is safe, after the all the collected traces had been processed.I have generated the reproducer test, hence the more verbose comments, but I think they might be useful for history keeping. The test is using ASAN poisoning and will reliably crash when run under ASAN.
How to test the change?:
Added a new gtest which is supposed to be run under ASAN.
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!