News for hackers. Stuff that matters.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by kouteiheika on Tuesday September 12, 2023 @06:34AM (#37479031)
It's 2023, surely this is not yet another bug related to memory unsafety that could be avoided if we'd stop writing critical code that deals with extremely complex untrusted input (media codecs) in memory unsafe languages?

Yep, of course it is: https://github.com/webmproject/libwebp/commit/902bc919033134...

I guess libwebp could be excused as it was started when there were no alternatives, but even for new projects today we're still committing the same mistake[1][2][3].

[1] -- https://code.videolan.org/videolan/dav1d

[2] -- https://github.com/AOMediaCodec/libavif

[3] -- https://github.com/AOMediaCodec/libiamf

Yep. Keep writing these in C; surely nothing will go wrong.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by masklinn on Tuesday September 12, 2023 @06:42AM (#37479091)
We all know that’s The Price Of Freedom. As they say, “give me exploitable trivial memory safety bugs or give me authoritarian dystopia” (https://news.ycombinator.com/item?id=27638940).
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ignoramous on Wednesday September 13, 2023 @02:59AM (#37493126)
Dystopia? Given a choice, you'd rather trust a compiler than a human given the billions already lost to buffer overflows, read after free, and other memory related bugs, surely?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by EustassKid on Tuesday September 12, 2023 @06:49AM (#37479147)
Why aren't people using safe C compilers or libraries and stuff like that? Do they affect performance that much? If yes then what about libraries written in C so that they can be used in other languages (meaning performance is not the number one concern)?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by vesinisa on Tuesday September 12, 2023 @07:22AM (#37479422)
This is a great question.

The answer is that it's literally impossible to write a "safe C compiler" since the language is inherently memory unsafe.

There are various static analysis tools that can try to simulate C programs and try to automatically discover memory management bugs, but due to fundamental limitations of computation they can never catch all possible faults.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by blackpill0w on Tuesday September 12, 2023 @07:50AM (#37479634)
How difficult is it to make a compiler extension that remembers buffers' size and checks if we're overflowing at each access? It could be used at least just in debug versions of critical software.

It doesn't sound impossible to me but I know nothing about compiler development :)

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Tuesday September 12, 2023 @08:37AM (#37480192)
You can, it's called valgrind (or more accurately, memcheck). And people don't use valgrind because it is slooooooow. Dynamic checking is useful, but not an ultimate way to go.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjc50 on Tuesday September 12, 2023 @08:16AM (#37479926)
> remembers buffers' size

Where?

Once you have a bare pointer, you've lost track of what the original definition might have been, so you (the compiler / runtime / programmer) have no way of knowing that you've exceeded the size.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by astrange on Tuesday September 12, 2023 @02:08PM (#37485101)
That's not true, it is merely true on most ABIs. The only case where C really erases this information is casting to uintptr_t and back.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by Gibbon1 on Tuesday September 12, 2023 @02:41PM (#37485698)
gcc also has some builtins to check pointer sizes when the compiler is able to figure it out.

https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Object-Size-Che...

Which is why I harp on the idea that the real problem is the gold bricks on WG14 who are intentionally blocking improvements to make C safer.

Also point out that if you can implement C on 16bit 0x86's segmented architecture you can certainly implement C with phat pointers too.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjmlp on Wednesday September 13, 2023 @02:09AM (#37492793)
Unless it is clearly specified on the ISO C standard, it is true in practice, and something that is impossible to rely on.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by refulgentis on Tuesday September 12, 2023 @08:04AM (#37479783)
It's trivial but Big Tech is in bed with Big Hacker

Or it's hard like everyone keeps saying.

I'm going with the second option

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by insanitybit on Tuesday September 12, 2023 @08:45AM (#37480298)
I think the short answer is "trivial in some cases, impossible in others". It's almost certainly possible that your compiler could inspect every allocation and tag each pointer with it internally. The problem comes with everything else - once you add loops and conditionals the length of that pointer can be all over the place. You'd basically need a symbolic executor tracking every pointer.

There are some big issues with this:

1. It's slow. Symbolic execution involves the interpretation of your program.

2. It would be imperfect and you'd likely have false positives.

3. It would likely be incomplete - for example, how would you handle the situation of only having a header?

So it's a good idea but it's very hard to make practically useful.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by UncleMeat on Tuesday September 12, 2023 @08:53AM (#37480403)
Hard. Apple actually has a RFC for this where functions taking buffer-like parameters are adjusted to take an additional length parameter and then the compiler edits the code to plumb lengths through all of these things to insert a bounds check at use. This can work in many cases, but not all.

Rolling out this sort of change across a large codebase is hard as shit. While it sounds like it is mostly transparent, as soon as you run into a sufficiently large codebase all sorts of things start blowing up that you need to fix by hand before such a feature can be rolled out.

You can also do this with pointer tagging and some other techniques, but without hardware support this is amazingly slow. You can see just how much slower an asan build is, for example.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjmlp on Wednesday September 13, 2023 @02:08AM (#37492790)
Apple is basically catching up with the Windows XP SP2 effort, which lead to the introduction of SAL annotations on Windows, and yes it was the reason for its delay.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by jcranmer on Tuesday September 12, 2023 @02:10PM (#37485123)
The easy way to do it involves changing the ABI of pointers so that they are now (address, bounds) pairs instead of just addresses. However, an awful lot of C code assumes that a pointer is just an address, and changing the ABI in this way will break the vast majority of non-trivial programs. (Witness the difficulty CHERI has in getting major software to work with it.)
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by LoganDark on Tuesday September 12, 2023 @07:03AM (#37479250)
...What is a "safe C compiler"?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by deusum on Tuesday September 12, 2023 @07:06AM (#37479273)
...a textbook oxymoron?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ReptileMan on Tuesday September 12, 2023 @07:19AM (#37479392)
Check on the fiction section sir. Here is the CS one.

Although I think all the C compilers are safe ish lately. I haven't seen exploits that target defects in output. Usually the error is ID10T located in the prekeyboard device.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by littlestymaar on Tuesday September 12, 2023 @07:43AM (#37479578)
rustc /s
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by adrian_b on Tuesday September 12, 2023 @07:52AM (#37479651)
All decent C compilers have compilation options so that at run-time any undefined actions, including integer overflow and out-of-bounds accesses, will be trapped.

The only problem is that these options are not the default and most C developers do not use them, especially for release versions.

I always use them, including for releases. In the relatively rare cases when this has a performance impact, I disable the sanitize options only for the functions where this matters and only after an analysis that guarantees that events like overflows or out-of-bounds accesses cannot happen.

Despite the hype, by default Rust is not safer than C compiled with the right options, because the default for Rust releases is also to omit many run-time checks.

Only when Rust will change the default to keep all run-time checks also in release builds, it will be able to claim that by default it is safer than C.

For now, when safety is desired, both C and Rust must be compiled with non-default options.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by steveklabnik on Tuesday September 12, 2023 @08:23AM (#37480004)
> Only when Rust will change the default to keep all run-time checks also in release builds, it will be able to claim that by default it is safer than C.

Which checks are you thinking of? The only thing that comes to mind is that integer overflow wraps instead of panics, but given that bounds are checked, it is still going to be a panic or logic bug rather than a buffer overflow.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by hannob on Tuesday September 12, 2023 @08:07AM (#37479823)
FWIW it is not recommended to use asan+co for release builds. These are designed as debugging tools, if you use them in production builds they may actually open up new bugs. See also: https://www.openwall.com/lists/oss-security/2016/02/17/9

I don't think anyone has built anything practically usable that is meant for production, though it wouldn't be impossible to do so.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by astrange on Tuesday September 12, 2023 @04:11PM (#37487472)
It's more or less okay to use UBSan in production though, and that can be good.

But sometimes DoS is considered an exploit, and in that case you don't want to make things easier to crash.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by planede on Tuesday September 12, 2023 @07:57AM (#37479715)
Do you release with `-fsanitize=address` or what?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by insanitybit on Tuesday September 12, 2023 @08:48AM (#37480342)
It sounds like you're referring to sanitizers.

1. Notably, some sanitizers are not intended for production use. I think this has changed a bit for asan but at one point it made vulns easier to exploit. These aren't mitigations.

2. They're extremely expensive. You need tons of bookkeeping for pointers for them to work. If you're willing to take that hit I don't really understand why you're using C, just use a GC'd language, which is probably going to be faster at that point.

> Only when Rust will change the default to keep all run-time checks also in release builds, it will be able to claim that by default it is safer than C.

The only thing Rust turns off at release is that unsigned integer overflows panic in debug but wrap on release. That wrap can not lead to memory unsafety.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by LoganDark on Thursday September 14, 2023 @12:07AM (#37504861)
> the default for Rust releases is also to omit many run-time checks.

...because the type system and borrow checker satisfies them at compile-time?

The only checks that are omitted at runtime are:

- checks that are exhaustively proven to be unnecessary by LLVM - checks that can never be triggered in the absence of UB

You shouldn't be triggering UB checks at runtime. If you rely on these checks, you're relying on UB itself, when all UB should be provably impossible.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by blackpill0w on Tuesday September 12, 2023 @07:55AM (#37479693)
Not necessarily a "safe compiler" but maybe safe library for containers and things like that. It seems to me that most if not all major C projects just run sanitizers and static analysers.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjc50 on Tuesday September 12, 2023 @08:15AM (#37479909)
You can't really retrofit safety to C. The best that can be achieved is sel4, which while it is written in C has a separate proof of its correctness: https://github.com/seL4/l4v

The proof is much, much more work than the microkernel itself. A proof for something as large as webP might take decades.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by LoganDark on Thursday September 14, 2023 @05:33AM (#37506752)
> A proof for something as large as webP might take decades.

Assuming that it is even provable in the first place.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by tannhaeuser on Tuesday September 12, 2023 @06:59AM (#37479223)
Last time Rust was considered for browser development, it ended in an incredible nepotistic shit show, years of promoting your favorite programming language without actual tangible results delivered, and ultimately firing of the entire fsking Rust team.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ptx on Tuesday September 12, 2023 @07:08AM (#37479288)
Mozilla's wiki [1] says Firefox has shipped more than 20 components implemented in Rust and has several more currently in progress. That sounds like tangible results.

The first component they implemented in Rust, I think, was the MP4 parser, in order to avoid exactly the kinds of vulnerabilities this article is about, which tend to occur in parsing code.

[1] https://wiki.mozilla.org/Oxidation#Shipped

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjmlp on Tuesday September 12, 2023 @07:03AM (#37479249)
Rust is now being introduced in Chrome, exactly because no matter what, the team keeps getting into these issues.

https://security.googleblog.com/2023/01/supporting-use-of-ru...

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by LoganDark on Tuesday September 12, 2023 @07:04AM (#37479257)
Servo was a major start to the Rust ecosystem (+ major help on Rust's path to a final design for 1.0) and also produced webrender and a few other pretty important libraries. Those are absolutely tangible results.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by supermatt on Tuesday September 12, 2023 @07:06AM (#37479279)
> without actual tangible results

The entire styling engine in firefox is written in rust.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by kriro on Tuesday September 12, 2023 @07:15AM (#37479351)
Pretty solid motivation for anyone who tries to tackle the browser market (a task I envy noone for) to go with a language like Rust. Inherent advantages + the incumbents can't get it to work internally.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by tannhaeuser on Tuesday September 12, 2023 @07:47AM (#37479608)
I don't know there's a "browser market". As it is, I think the existing code bases are better served by gradually employing C/C++ verification and invariant checking tools. And not make the web any more complicated than it already is without a need (other than to maintain a browser cartel, that is).
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by o1y32 on Tuesday September 12, 2023 @08:09AM (#37479840)
> anyone tried to tackle the browser market

Bad news, barely anyone is even thinking about it. There are one or two players that are trying to build a new browser from scratch, but they are far from mainstream and nobody knows how long these efforts will exist.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by Ar-Curunir on Tuesday September 12, 2023 @07:02AM (#37479241)
Completely untrue. Servo was from the start a research project, but even then, big components like webrender and stylo are now parts of Firefox, and there's a whole list more here: https://wiki.mozilla.org/Oxidation
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by tannhaeuser on Tuesday September 12, 2023 @02:49PM (#37485865)
What is completely untrue? When the Rust team was let go in 2020, only a very minor part of Servo (Stylo) delivered and became part of FF according to [1]. Yet the Rust core team, already notorious for lone language decisions, engaged in what amounted to an epic risk of a publicity catastrophe for Mozilla. And even in their post mortem in [1], they care more about progressing Rust than about their employer or the (much more important) work they were paid for.

[1]: https://news.ycombinator.com/item?id=24143819

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by steveklabnik on Tuesday September 12, 2023 @03:48PM (#37487010)
9.6% of Firefox is Rust as of today https://4e6.github.io/firefox-lang-stats/

That is 3.4 million lines.

And frankly I am upset by the way you characterize my post there. First of all, as I said, it was in a personal capacity, not a statement from the team. Second, as I was not employed by Mozilla at the time, of course I care more about Rust than I do Mozilla. However, that does not mean that I did not care for those who were let go, we were all very upset at how unfortunate the situation was. And the broader community stepped up and hired everyone, as far as I know.

And also language like "already notorious for lone language decisions," that is how both the Rust project and Mozilla wanted it! They actively did not control language decisions, even when Rust was small enough that the only folks who worked on it were at Mozilla. Nobody wanted Rust to be a single vendor technology, because of the exact risk of the situation that came to pass. Imagine if Rust were 100% Mozilla at that time, and they abandoned it. Instead of it being a bump in Rust's development, it would have been a catastrophe.

And, your original post: "the entire fsking Rust team." Again, Mozilla employed a very small number of people that made up the overall team. Yes, they were critical people, who did a lot of important work, but "fired the entire team" is straightforwardly inaccurate.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lightedman on Tuesday September 12, 2023 @07:36AM (#37479517)
If you think Rust is entirely memory-safe, I've got a bridge in Brooklyn to sell you.

Man can make it, man can break it.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by quickthrower2 on Tuesday September 12, 2023 @07:51AM (#37479642)
Does it have to be? Riding a bicycle with a helmet isn’t entirely safe, but I still prefer to wear one.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by acdha on Tuesday September 12, 2023 @08:09AM (#37479838)
That’s like saying we shouldn’t wear seatbelts or have airbags and antilock brakes because you can still die in a crash.

If anything, that’s still underselling it: there are entire categories of bug which are widespread even in well-tested, heavily-fuzzed C codebases like Chrome but would not be likely or often possible in Rust.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Tuesday September 12, 2023 @07:40AM (#37479545)
We don't have a very good mainstream [1] solution for critical and performance-hungry applications. I do think that they are limited in number (many applications are not that performance-hungry) and Rust is already good enough, but those applications need the proof for correctness so that more dangerous code---say, what would need `unsafe` in Rust---can be safely added. This particular bug could have been reasoned once you know where to look at, after all.

[1] In my definition, this translates to "as popular and user-friendly as sanitizers".

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by bennettnate5 on Tuesday September 12, 2023 @08:49AM (#37480361)
> those applications need the proof for correctness so that more dangerous code---say, what would need `unsafe` in Rust---can be safely added

There are actually already tools built for this very purpose in Rust (see Kani [1] for instance).

Formal verification has a serious scaling problem, so forming programs in such a way that there are a few performance-critical areas that use unsafe routines seems like the best route. I feel like Rust leans into this paradigm with `unsafe` blocks.

[1] - https://github.com/model-checking/kani

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Tuesday September 12, 2023 @09:05AM (#37480542)
Yeah, I'm aware of Kani, but it is not optimal for many reasons, including but not limited: hard to install in some cases, loop unrolling is mandatory and does not scale in general (this is a main issue with bounded model checkers, not just Kani), and hard to give hints for efficient verification and/or harness generation. And Kani makes use of CMBC, which is a model checker for C/C++, so Rust is not even special in this regard.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by irundebian on Tuesday September 12, 2023 @08:59AM (#37480468)
It should be possible with Ada/SPARK. It's focused on low level systems programming and compilable programs are free from run-time errors. In addition, the correctness of the program or key properties can be proven at compile-time.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ignoramous on Wednesday September 13, 2023 @03:03AM (#37493149)
> "as popular and user-friendly as sanitizers" solution for critical and performance-hungry applications.

Google just did enable Memory Tagging Extension (ARM's hardware accelerated sanitizers) on the Pixels last year. May be sanitizing ISAs offer hope?

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Wednesday September 13, 2023 @04:26AM (#37493802)
MTE is good to have, but it only reduces the probability of successful attacks (by a factor of 16). If the process is allowed to segfault multiple times attackers have a good chance to work around MTE.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ignoramous on Thursday September 14, 2023 @06:50AM (#37507280)
That's a general limitation with tagged pointers, I belive? Have you come across demonstrations of such exploits?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by akyuu on Wednesday September 13, 2023 @05:54PM (#37502254)
Do you have a source for that? AFAIK Pixel 7 uses an ARM v8.2 CPU, which doesn't support MTE. The upcoming Pixel 8 might support it, but Google hasn't announced anything yet.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by ignoramous on Thursday September 14, 2023 @06:53AM (#37507304)
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by alexvitkov on Tuesday September 12, 2023 @08:04AM (#37479785)
We still don't have an alternative. No, you can't use Arc<HashMap<Whatever>> in the middle of a decoder routine. Some software to actually has to perform well.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by cypress66 on Tuesday September 12, 2023 @08:35AM (#37480172)
Even if bounds checking made the decoder 10x slower, would that even matter, outside of low end mobile devices? How many milliseconds are spent decoding images in your average website anyway?
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Tuesday September 12, 2023 @08:07AM (#37479820)
In this particular case Rust could have helped, because the table construction can use a normal Rust while the tight decoder loop can remain `unsafe` which can be justified more easily. But I demand more than the human-readable justification.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by alexvitkov on Tuesday September 12, 2023 @08:20AM (#37479970)
What Rust brings to the table is static enforcement of its ownership rules, that's it.

How does Rust deal with buffer overflows? Bounds checking. What an innovative solution, congratulations to the Rust people for this groundbreaking innovation. And they keep acting like they've fucking discovered hot water.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by lifthrasiir on Tuesday September 12, 2023 @08:32AM (#37480126)
Rust is novel because it bundles lots of existing ideas into one usable package. Even the borrow checking is not new, it's adapted and improved from research languages like Cyclone.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by delfinom on Tuesday September 12, 2023 @08:32AM (#37480134)
Yea but did anyone else market hot water first? I think not!
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by insanitybit on Tuesday September 12, 2023 @08:50AM (#37480365)
No one is saying that bounds checking is novel. It's really C and C++ that are novel, in that they are the only languages where bounds checking is not the default.

But if you're having the "memory safe replacement for C/C++" conversation it shouldn't surprise you that people bring up Rust.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by danShumway on Tuesday September 12, 2023 @02:37PM (#37485618)
Agreed, the interesting part isn't that hot water exists, it's that given the widespread existence of hot water so many people still insist on exclusively showering with cold water.

I'm not even saying that bounds checking should be used everywhere, just that it really does seem like unsafe shouldn't be the default for so many projects.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by jonas21 on Tuesday September 12, 2023 @04:50PM (#37488084)
I'd say the analogy goes the other way around.

Showering with cold water is obviously safer (no chance of accidentally scalding yourself). But most people prefer showering with hot water because it's the way they've always done it, they're more comfortable with it, and while they could get burned by it, they view the risk of significant damage to be relatively low (if you discover the water is too hot, fix it quickly and you'll probably be fine).

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by pjmlp on Wednesday September 13, 2023 @02:12AM (#37492812)
Time to repost my favorite C.A.R Hoare quote from 1980, as C was gaining traction.

"Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980, language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law."

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by Ar-Curunir on Tuesday September 12, 2023 @01:44PM (#37484790)
Thankfully you can write C-like Rust code if you wanted, just safe. Nobody says that you have to use a "Arc<HashMap<Whatever>>" for this task. Indeed, people have written competitive and safe decoders for various image and video formats in Rust already.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by cookiengineer on Tuesday September 12, 2023 @08:32AM (#37480132)
Stagefright was the point when I started to tell people to use a safe programming language.

When they ask "Which one?" I am answering "I don't care, as long as it's a programming language that uses a VM".

Every time I hear the discussions about how fast and perfect C is, people seem to miss the point that new programming languages try to avoid complexity, because they were using C/C++ themselves in the past and they fell on their noses more than once.

It's not about what is faster. It is about how often you make mistakes, statistically. And chances are you make dozens of mistakes per day in C that you will never be aware of, whereas in other memory constrained languages they have hundreds of mechanisms implemented to catch those common mistakes.

Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by Filligree on Tuesday September 12, 2023 @09:18AM (#37480736)
You should allow Rust as well, at least.
Re:CVE-2023-4863: Heap buffer overflow in WebP (Chrome) by cookiengineer on Wednesday September 13, 2023 @11:56PM (#37504803)
Yeah ofc. My view on programming languages is that both Rust and golang try to use VM methodologies wherever possible when it comes to memory safety and ownership. They just try to do as much as possible ahead of compile time rather than execution time.