Summary: | Crash when loading a SVG image | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, agomez, bfulgham, mcatanzaro, product-security, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2018-05-21 06:25:10 PDT
Created attachment 340848 [details]
Patch
CC WK2 owners (In reply to Carlos Garcia Campos from comment #0) > I'm not sure about the security implications of this crash, so I've used the > security product just in case. It dies with SIBABRT, so that's totally safe, and at worst this could be a denial of service. std::optional::value throws a std::bad_optional_access exception, but that becomes abort() because WebKit is built with -fno-exceptions. (In reply to Carlos Garcia Campos from comment #0) > I don't know why this crash didn't happen before to me A few weeks ago, Yusuke switched us from WTF's implementation of std::optional to the standard library's. That requires GCC 7. Comment on attachment 340848 [details]
Patch
Good catch! r=me
Comment on attachment 340848 [details]
Patch
Why is this not testable? Why don't we make WebResourceLoader::TrackingParameters::pageID and frameID std::optional, too?
(In reply to Alex Christensen from comment #7) > Comment on attachment 340848 [details] > Patch > > Why is this not testable? I tried to make a test case, but I couldn't. I'm not familiar with SVG, it seems to happen when an image tag inside an svg contains another image, but I haven't managed te create a test. This always happens when visiting http://www.mutua.es. I also tried to extract the test case from that page but failed too. If someone knows how to create a test case for this we can add it in a follow up patch. > Why don't we make > WebResourceLoader::TrackingParameters::pageID and frameID std::optional, too? I don't think that helps. The tracking parameters are used in a lot of log messages, we would need to use value_or(0) everywhere. Then we would also need to make std::optional webPageID and webFrameID in NetworkLoadParameters (or use vale_or(0) when assigning the network load parameters). That would also require a lot of changes in network process code. If we ever get rid of the empty client, those will no longer be optional, so I don't think it's worth all the changes involved. Committed r232056: <https://trac.webkit.org/changeset/232056> *** Bug 186048 has been marked as a duplicate of this bug. *** |