Page MenuHomePhabricator

[ASan][libc++] Annotating std::deque with all allocators
Changes PlannedPublic

Authored by AdvenamTacet on Mar 24 2023, 8:25 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

This patch is part of our efforts to support container annotations with (almost) every allocator.
Annotating std::deque with default allocator is implemented in D132092.

Support in ASan API exests since rG1c5ad6d2c01294a0decde43a88e9c27d7437d157.

The motivation for a research and those changes was a bug, found by Trail of Bits, in a real code where an out-of-bounds read could happen as two strings were compared via a std::equals function that took iter1_begin, iter1_end, iter2_begin iterators (with a custom comparison function).
When object iter1 was longer than iter2, read out-of-bounds on iter2 could happen. Container sanitization would detect it.

If you have any questions, please email:

  • advenam.tacet@trailofbits.com
  • disconnect3d@trailofbits.com

Diff Detail

Event Timeline

AdvenamTacet created this revision.Mar 24 2023, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 8:25 AM
AdvenamTacet requested review of this revision.Mar 24 2023, 8:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2023, 8:25 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
AdvenamTacet planned changes to this revision.Mar 24 2023, 8:26 AM

I will add tests.