Chromium Code Reviews
DescriptionService worker creation from <link> leads to nullptr dereference
If a sandboxed iframe or a frame in a suborigin attempts to register a
service worker with <link rel=serviceworker>, it leads to a nullptr
deference. This is because ServiceWorkerLinkResource::process() does not
account for the possibility that NavigatorServiceWorker::serviceWorker
can return a nullptr. In this case, sandboxed iframes and suborigins are
not allowed to register service workers, so they return nullptr.
The solution is to check for nullptr and throw an appropriate error.
Tests are added to verify as well.
BUG=649239
Committed: https://crrev.com/2c0f1f71edd2ae034329ad2617e68fa89dbe536c
Cr-Commit-Position: refs/heads/master@{#420853}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Nits from falken@ #
Total comments: 2
Patch Set 3 : Rebase on ToT #Patch Set 4 : Formatting #
Messages
Total messages: 17 (6 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||