| Summary: | Add maximum depth check to RedBlackTree | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tadeu Zagallo <tzagallo> | ||||||||||||||
| Component: | Web Template Framework | Assignee: | Tadeu Zagallo <tzagallo> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, ews-watchlist, mark.lam, saam, webkit-bug-importer | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Tadeu Zagallo
2020-10-02 14:02:52 PDT
Created attachment 410368 [details]
Patch
Created attachment 410377 [details]
Patch
Comment on attachment 410377 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410377&action=review > Source/WTF/wtf/RedBlackTree.h:353 > + RELEASE_ASSERT(++depth <= s_maximumTreeDepth); I think this is wrong. This function iterates over the set of all nodes, not the depth of the tree. So, this check is incorrect. Created attachment 410532 [details]
Patch
Created attachment 410537 [details]
Patch
Created attachment 410592 [details]
Patch
Comment on attachment 410592 [details]
Patch
LGTM, but let's fix iterate with your idea of making it simpler
Created attachment 410720 [details]
Patch
Comment on attachment 410720 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410720&action=review > Source/WTF/ChangeLog:9 > + We limit all tree traversals to 128 levels deep. That's a very conservative upper bound that Is this a security hardening measure? What motivated the change? Comment on attachment 410720 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=410720&action=review r=me > Source/WTF/wtf/RedBlackTree.h:353 > + RELEASE_ASSERT(++size < std::numeric_limits<unsigned>::max()); Just use Checked? Committed r268135: <https://trac.webkit.org/changeset/268135> All reviewed patches have been landed. Closing bug and clearing flags on attachment 410720 [details]. |