@adamshostack @matthew_d_green I was thinking about the Windows 7 multimedia threat modeling and fuzzing effort while reading this.
And of course, modern multimedia hardware makes this SO much more interesting (in Win7, much of the decoding was done in software).
@dalias @matthew_d_green ffmpeg is as others mentioned, C+ASM so dangerous by default, but also it's a loose collection of third-party encoders/decoders — it rarely provides its own, doing essentially (de)muxing + gluing everything together (also filtering, resampling, etc. which aren't terribly relevant here)
tl;dr ffmpeg gives you access to the same hw-accelerated decoders as everyone else and those are the obscure/vulnerable bits
@fasterthanlime @matthew_d_green I've been out of the loop for a long time but historically all the interesting codecs were using maximally shared code and only a couple they didn't have native yet in the encoding direction glued random third party library code in.
C+asm in this kind of context is not dangerous by default. It's wacky use of malloc+free where all objects should have permanent lifetime with the codec context that's dangerous. Juggling malloc+free with bitstream processing = 🦇💩
@Paxxi @dalias @matthew_d_green I'm actually less wary of the ASM bits since afaict they're operating on fixed size buffers and are doing efficient packing/unpacking/swizzles/color conversions (but I haven't read it all!)
Re C: one of the vulnerabilities mentioned in the paper is a good old missing bounds check on a fixed-size (256) buffer — no cavalier use of malloc/free involved there!
@matthew_d_green I'm *very* happy to see people finally proving this and calling it out. I've assumed this to be true about codecs forever; they're just too complex.
Hardware manufacturers and their software contractors all focused primarily on performance and feature checkbox filling are the last people I trust to perform secure data handling.