Fix race that can cause UAF in SafeBrowsingNetworkContext::SharedURLLoaderFactory::InternalState.
The problem was the constructor was posting a task to a different thread, which could execute before the constructor returns and a reference is held. This was seen in https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.memory%2FLinux_ASan_LSan_Tests__1_%2F44439%2F%2B%2Frecipes%2Fsteps%2Fbrowser_tests%2F0%2Flogs%2FMSE_ExternalClearKey__x2f_EncryptedMediaTest.Playback_VP9Video_WebM_Subsample__x2f_0%2F0 Bug: 825242 Change-Id: Ib851536adc57bfab14748e1f7324b143aff55033 Reviewed-on: https://chromium-review.googlesource.com/992876Reviewed-by:Ken Rockot <rockot@chromium.org> Commit-Queue: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#547758}
Showing
Please register or sign in to comment