| Summary: | Network process crashes decoding invalid cache entry on 32bit system | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||||
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | andersca, cdumez, cgarcia, commit-queue | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Antti Koivisto
2015-06-10 07:27:57 PDT
Created attachment 254653 [details]
patch
Created attachment 254670 [details]
patch
Comment on attachment 254670 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=254670&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.cpp:52 > + return currentOffset() + size <= m_bufferSize; Does not the following code fix the overflow issue regardless whether it runs on 32 or 64bit? return size <= m_bufferEnd - m_bufferPosition; Otherwise I would suggest changing the last statement to be: return size <= m_bufferSize - currentOffset(); Subtraction is always safer when dealing with large numbers but they have to have the same sign. Created attachment 254678 [details]
patch 2
> return size <= m_bufferEnd - m_bufferPosition;
Yeah, that's a better idea. Did that instead.
|