3 ms·
It's a programming language issue. Any time you're writing complex format parsing code in an unsafe language like C, you're going to run into these problems. Un
by marcan_42 5y ago
It's a programming language issue. Any time you're writing complex format parsing code in an unsafe language like C, you're going to run into these problems. Unfortunately, Rust didn't exist when ffmpeg was created.
Patents have absolutely nothing to do with this; they don't affect the security of the resulting code.
Nobody can write code for all the formats ffmpeg supports and do it safely, in C. Nobody. You think audits work? Tell that to Infineon, who shipped a broken RSA key generator implementation. In a cryptography product. Which was audited privately. And that's a critical part of the code that should've had many eyes on it.
Perfect memory safety for C parsers for hundreds of formats? Yeah, not going to happen. It has nothing to do with the code quality of ffmpeg. It's just not humanly possible to get this right in every instance.
- qayxc 5y ago> It's just not humanly possible to get this right in every instance. That's what theorem provers and model driven development are for. I wish these tools could be used more. There should also be automated completeness checkers for requirements and specs - a lot of errors, incompatibilities and security issues are the result of ambiguous, contradictory, or incomplete specs and requirements.
- marcan_42 5y ago> That's what theorem provers and model driven development are for. That's building a safe programming language on top of an unsafe one. At that point you might as well just use a safe programming language. That won't fix logic errors, but the vast majority of security issues are safety problems, especially in this kind of codebase.
- ellis0n 5y agoThere is no algorithm in the world for how to check whether a video codec is working correctly or not
- afiori 5y agoThe model checking would not check the output but the trace of operations. It might prove that all bytes of the output were written to at least once, that dereferenced pointers point toward either the input or some other valid structure, and other properties like this.
- ellis0n 5y agoI agree with RSA key generator implementation idea and I like Rust is better C idea
- deleted 5y ago[deleted]