mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
We currently have a FIXME to validate cached data with a crc32. But this is sort of a non-starter, because we never actually have the cached data in-memory - we transfer it to the WebContent process via system calls, and it never reaches userspace in RequestServer. Chrome makes a bit of an educated gamble here. They assume cosmic bit blips are extremely unlikely, thus the cached data does not get verified with a hash. Instead, they store non-cryptographic hashes of some select fields, and they validate just those hashes. Here, we store a hash of the cache key in the cache header, and a hash of the cache header in the cache footer. With these validations, along with other validations already in-place, we can be reasonably sure we are not sending corrupt data to the WebContent process. |
||
|---|---|---|
| .. | ||
| ImageDecoder | ||
| RequestServer | ||
| WebContent | ||
| WebDriver | ||
| WebWorker | ||
| CMakeLists.txt | ||