News for hackers. Stuff that matters.
Re:Twenty One Zero-Days in FFmpeg by codedokode on Saturday June 13, 2026 @05:54AM (#48515445)
If there are so many vulnerabilities, should not they change approach to development, for example, use memory-safe languages, static analysis, do not use dubious "hacks" that break it?
Re:Twenty One Zero-Days in FFmpeg by ivanjermakov on Saturday June 13, 2026 @06:05AM (#48515529)
Memory safety and critical performance rarely go together. Big chunk of FFmpeg is written in assembly to sqweeze most hardware performance.

https://news.ycombinator.com/item?id=43140614

Re:Twenty One Zero-Days in FFmpeg by IshKebab on Saturday June 13, 2026 @08:40AM (#48516709)
Sure but it seems like most of these vulnerabilities are being found in the C code.
Re:Twenty One Zero-Days in FFmpeg by bybrooklyn on Monday June 15, 2026 @07:18AM (#48539660)
Rust could help with this!
Re:Twenty One Zero-Days in FFmpeg by leonidasrup on Sunday June 14, 2026 @01:42AM (#48524509)
It would be interesting to see the results from a fuzzer, developed for FFmpeg style assembly code.
Re:Twenty One Zero-Days in FFmpeg by cryo32 on Saturday June 13, 2026 @05:56AM (#48515465)
No. They tried that with coreutils and look what happened. More CVEs.

99% of what I throw though ffmpeg is trusted i.e. I created it. It’s not a major risk.

Re:Twenty One Zero-Days in FFmpeg by acdha on Saturday June 13, 2026 @06:36AM (#48515758)
coreutils was a category error: they took a set of tools which were not very exposed to memory safety errors and rewrote them in a language which does nothing to prevent the kind of logic errors coreutils has suffered from (mostly races around file operations). It’s like complaining that an airbag didn’t save you after driving into a lake.

In contrast, ffmpeg is exactly the sweet spot for a memory-safe language with those complex decoders operating on data which is often untrusted. I wouldn’t suggest a project of that scale lightly but it’s at least a near-perfect fit on the problem domain.

Re:Twenty One Zero-Days in FFmpeg by anoneng on Saturday June 13, 2026 @07:24AM (#48516122)
I would say it’s the opposite. coreutils is core utils, you cannot write shell scripts without them, they are widely and almost unavoidably used in trusted environments. They are also relatively simple.

With ffmpeg, anyone who knows anything about secure application development in the past 20 years knows that it is a huge security tarpit and throwing it untrusted inputs in trusted environment is asking to be owned. You thoroughly sandbox that shit. That’s true for all untrusted media conversion, but absolutely with ffmpeg.

Re:Twenty One Zero-Days in FFmpeg by zahlman on Saturday June 13, 2026 @10:49AM (#48517882)
> you cannot write shell scripts without them, they are widely and almost unavoidably used in trusted environments.

True.

That doesn't make them "very exposed to memory safety errors".

Re:Twenty One Zero-Days in FFmpeg by acdha on Saturday June 13, 2026 @08:15PM (#48522842)
My point about coreutils was that they’re rarely used in situations where an attacker can provide arbitrary input - it’s more like race conditions with code already running on the same system trying to escalate access – so what you need to protect against are things like race conditions around file operations or symlink safety.
Re:Twenty One Zero-Days in FFmpeg by krageon on Saturday June 13, 2026 @07:07AM (#48516001)
The coreutils rewrite was shit because of the license change. Most of the other founding ideas were also bad as you say, but the license change was absolutely a much worse signal. Just a bunch of people rolling over and showing big corps their belly. And for what? So they can be more exploited by people that treat them like cattle.
Re:Twenty One Zero-Days in FFmpeg by IshKebab on Saturday June 13, 2026 @08:43AM (#48516736)
Rust does not do "nothing" to prevent logic errors. On the contrary, its strong type system makes them much less likely than in C.

Also security isn't the only reason to prefer Rust to C.

But I do agree ffmpeg would see a much bigger benefit from being written in Rust.

Re:Twenty One Zero-Days in FFmpeg by acdha on Saturday June 13, 2026 @08:30PM (#48522957)
Look, I like Rust and ported every bit of C I used to it a decade ago but this is not a compelling argument. The coreutils rewrite is an existence proof that the typing system doesn’t motivate this class of error and a moment’s thought would explain why (you’d have to be very familiar with the attack patterns to know to create types like “handle to private file failing if the name exists” and they weren’t).

What could help would be a modern API implementing the same patterns that GNU coreutils evolved over the last 4 decades but that’d be less the language than the library and it’d only go so far because some of those utilities legitimately need to things which are otherwise rare in most applications.

Re:Twenty One Zero-Days in FFmpeg by codedokode on Saturday June 13, 2026 @06:31AM (#48515728)
In case with coreutils, as I remember, there were mostly race conditions. Not memory safety issues. Maybe we just need better I/O libraries.
Re:Twenty One Zero-Days in FFmpeg by uecker on Saturday June 13, 2026 @08:48AM (#48516770)
Or use a buffer abstraction in C. This is not exactly rocket science. The "this is impossible to prevent in C" nonsense does far more harm than good.
Re:Twenty One Zero-Days in FFmpeg by codedokode on Saturday June 13, 2026 @10:50AM (#48517893)
To be fair, C is a pain to use, so it is better to improve Rust. It is annoying when for example, you have to free several allocated structures when there is an error in the middle of a functon.
Re:Twenty One Zero-Days in FFmpeg by uecker on Saturday June 13, 2026 @11:28AM (#48518224)
I personally like to use C and find Rust annoyingly complex. I think it may be an alternative to C++, but C++ is also too complex for my taste. I do not find it annoying to free several allocated structures when there is an error, but one could also automate this with a often used extension.

There is also the question whether trading memory safety against supply chain risks is really worth it.

Re:Twenty One Zero-Days in FFmpeg by shermantanktop on Saturday June 13, 2026 @12:42PM (#48518943)
Errors are easily found and corrected for a modest one-person project in C.

But we’re combining probability of error creation (which is effectively constant) and the limits of human cognition.

Some things are impossible at one scale, become possible at another, and become inevitable at yet another.