Fix UAF in DnsTransaction
Starting a TCP DNS attempt cancels and deletes any previous running attempts. Fix the filtering to skip retriable errors that will not retry because we have exhausted available attempts. Otherwise, if an attempt has already completed synchronously and posted to handle the result, it could try to handle the result of a deleted attempt. Also replace the raw Attempt pointer in AttemptResult with a WeakPtr, so any future similar bugs will safely DCHECK and crash instead of UAF. Bug: 860292 Change-Id: I4a012a078b9b35f87b95a9592f4e43573c6a0708 Reviewed-on: https://chromium-review.googlesource.com/1134028 Commit-Queue: Matt Menke <mmenke@chromium.org> Reviewed-by:Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#575085}
Showing
Please register or sign in to comment