News for hackers. Stuff that matters.
Re:Google assigns a CVE for libwebp and gives it a 10.0 score by ninkendo on Tuesday September 26, 2023 @01:28PM (#37662761)
Elsewhere in the comments someone linked to this: https://dropbox.tech/infrastructure/lossless-compression-wit...

It looks like dropbox experimented with disabling bounds checks in their huffman coding impl, and found that using the unsafe pattern increased throughput from 224 MB/s to 249 MB/s (11%-ish faster.) We don’t even need to hypothesize about whether webp would have elminated bounds checking, we can see that other companies arrived at the same conclusion: Disabling it can be worth it if you’re quite sure you’ve gotten the up-front checking right. We can imagine that if Dropbox went to prod with the unchecked huffman implementation (never mind that that article isn’t about webp in particular), we could imagine they could easily have the same bug. And I don’t think a naive code review saying “unsafe is bad” would have stopped them from doing it: they clearly did the work to show why it’s worth it.

Re:Google assigns a CVE for libwebp and gives it a 10.0 score by howinteresting on Tuesday September 26, 2023 @02:28PM (#37663737)
Thank you.
Re:Google assigns a CVE for libwebp and gives it a 10.0 score by hot_gril on Tuesday September 26, 2023 @02:29PM (#37663747)
Wonder how feasible it is to toggle bounds checking at boot time. Issue is it'd leave extra branches in there even when bounds checking is disabled.

Whenever a big vulnerability is found, everyone's devices could manually or automatically go into safe mode until patches are distributed. Old devices without patches can stay in safe mode and take the 10% hit or get manually booted in unsafe mode, kinda like Meltdown.

Re:Google assigns a CVE for libwebp and gives it a 10.0 score by hot_gril on Tuesday September 26, 2023 @03:17PM (#37664457)
The risk probably doesn't matter for their use case because they're doing all this datacenter-scale image conversion on processes separate from the main logic (and likely not even on the same machines). Unlike in a phone's web browser or something, where it's 11% speedup with ??% added risk.

It's already common for apps for PCs to split potentially unsafe rendering into subprocesses, like in Chrome. If you don't want to pay the full IPC toll, there's shared memory. Wonder how fast that would be.