by rwmj · 2y ago · 0 comments
(Chicken and egg problem here of course which is no one will create the websites until there is wide browser support.)
> We have tested conformance of the jxl-oxide decoder (which is implemented in Rust) and it is a fully conforming alternative implementation of JPEG XL. It correctly decodes all conformance test bitstreams and passes the conformance thresholds described in ISO/IEC 18181-3.
There are other decoders [0] written in a "safe language" (rust) listed as well. So no there are many "safe" implementations
A while back I fuzz tested qemu's handling of various different disk image formats (I know, a different type of "image", but bear with me!) I found many cases where qemu could consume huge amounts of memory or CPU time on some inputs. Often times the inputs were quite small too, allowing nasty amplification attacks. As a result of this standard advice for clouds that allow you to upload untrusted images is to decode in a separate process. That process is protected with ulimits, so it will die, rather than trying to allocate all memory in the machine or consume huge amounts of CPU.
Why single out JPEG XL?
WebP is one of the most recently added image formats, and it had zero day exploits as recently as 6 months ago.
Hopefully it isn't singled out, and any prospective support for a new image format gets the same scrutiny.
The question is different for any image format that is already supported, because removing it breaks the web to the extent the format is being used. That's really an argument to be particularly careful about adding support for a new format: once it is widely available for a while it is almost impossible to remove. This is a one-way decision (unless it's barely used, in which case there wasn't a good reason to add it in the first place).
Nothing you've said should be an issue. I expect really they just don't want "their" formats to be obsoleted.
There's the WebAssembly sandboxing trick (https://hacks.mozilla.org/2021/12/webassembly-and-back-again...) which might mitigate that, but an image decoder might fall into the "too performance-sensitive to accept the modest overhead incurred" case.