A new Chrome 0-day is sending the Internet into a new chapter of Groundhog Day
arstechnica.com
arstechnica.com
I guess there's a trade-off between reinventing the wheel vs. being open to 0-days that take down a lot of projects at a time.
The upside is of the current situation is that it will likely be patched more quickly than a smaller project would be able to since everyone will be looking at libvpx right now. One shared library update will fix a lot of programs, though if they use snap or flatpack or statically include it then it will be more of a mess.
Many applications present images from untrusted sources. I'm having a hard time thinking of a single application that will _encode_ untrusted input, beyond a browser.
It's _not_ a vulnerability that needs to be mentioned alongside the webp cve lest the public be caught unaware of something they need to update on every phone and laptop they own.
I have come to think about it more as comparative advantage of different programmers and their training / skill set. Not everyone has the skills to write a complex state machine for stream encoding (I haven’t read up on libvpx, so forgive me if I mischaracterized it). We shouldn’t expect a huge diversity of available libraries to do this task.
But we should have more tools to inform the consumer of libraries to see their risk from any individual library and there should be more transparency about alternatives/substitutes to make sure we don’t see a monoculture around an inferior library if a superior option exists.
We should expect specialists to write specialized code. But we should also have QA specialists (and hopefully lots of automation) review the code. And the more systems a library is installed on, the more verification/scrutiny should be put on that code. This is the strategy of Project Zero (Google’s 0day hunting project) and lots of other organizations should contribute similar efforts.
window.MediaStreamTrack = undefined
window.RTCPeerConnection = undefined
window.RTCSessionDescription = undefined
window.webkitMediaStreamTrack = undefined
window.webkitRTCPeerConnection = undefined
window.webkitRTCSessionDescription = undefinedIs there something inaccurate or naive in this paragraph?
Even the way to write C is not the same as 10 years ago.
But habits are hard to change. Forcing a change by changing the language is effective. Also, having languages that do more checks is also an option, but has performance impacts.
In the end, the weakest link is always the coder. Much more nowadays as they are asked to emit feature faster and faster.
It's just that there is a lot of legacy code, and the migration to languages like Rust will take a long time.
Codecs have a lot of "glue" code handling configuration, I/O, and other stuff besides their most performance sensitive bit-pushing loops.
But this safe-or-fast dilemma has been mostly solved with Rust (and Wuffs). I am writing codecs in Rust.
Rust has many zero-cost abstractions (high level wrappers that get inlined, and compiled for specific types and values you use them with, and it gets optimized as concrete low-level code). This allows writing a lot performance-sensitive code using safe Rust. For example, you don't get redundant bounds checks if you use iterators, and despite being high-level abstraction with chains of iterators and closures, they compile to simple loops, and may even get vectorized (even more so than C, thanks to Rust's stronger no-aliasing and immutability guarantees).
When you need something more adventurous, you can dress it in a safe (compiler-verified) higher-level abstraction on top of minimal amount of unsafe code. Even though the underlying unsafe code is as unsafe as C, making a small component out of it helps to review/test/fuzz it in isolation against its interface, rather than test it as part of a complex algorithm.
C's unchecked memory access is the problem, and modern languages have solved it while still allowing writing byte-level code. Claiming that any other language that allows reading and writing raw bytes would have the same issue simply shows you do not understand the problem or the many solutions already available.
This may change in future, e.g. by enough people turning to formal verification.
> any piece of software can if nothing else be used in a chained attack to cause harm
Does it mean that it is unsafe? In that case notion of safety seems to be destroyed.
It's been over 50 years; I don't think we're on the cusp of creating perfect software. Even formal verification and related methods - while a huge improvement! - aren't a silver bullet (AIUI, mostly in the "is your model right" and "does your theoretical analysis map to reality" points).
> Does it mean that it is unsafe? In that case notion of safety seems to be destroyed.
Yes, that's my point. If your software has exploitable bugs, it can be used in a chain of exploits to achieve attacks that don't appear plausible from individual components, and this means that most systems have a lot more attack surface than anyone wants to think about.
As for myself, maybe: "that which causes loss or injury to the user when handling of it does not intend this"?
What we are missing is that most people still don't do it as frequently as in other industries.