Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ResolverProxy use-after-free in HandleNodeBrowse (#13291)
HandleNodeBrowse decrements the ResolverProxy reference count, which will cause the object to be destructed if the counter reaches 0. It then increments the counter and accesses the object, which can be a use-after-free. This commit fixes the problem by ordering Release to occur after Retain. This commit also adds an abort to ReferenceCounted::Retain to check for cases like this when kInitRefCount is non-zero. For objects that are initialized with a non-zero reference count, we don't ever expect to call Retain when the count has already decremented to 0 because this indicates the object has been deleted. Fixes #13289
- Loading branch information