Remix.run Logo
▲ cowlevel 2 hours ago

So the recent RCE wave seems to be people finding more single byte overflows and such, but reporting them as RCEs because AI can do the tedious grunt work of finding the rest of the vulnerability chain.

If any single byte overflow can be converted into an RCE with minimal human effort then we have no choice but to prove the whole software stack is memory safe.

▲aja12 an hour ago | parent | next [-]

It's important to note that Java, like Rust, is generally seen as a memory safe language. But it has bits of assembly, just like Rust has unsafe blocks, to handle some operations. Hence the Java2shell recent vulnerability. Granted Rust may have less need for them and more facilities to audit them, but it is not by itself a panacea that will fix all memory issues. In essence, there is no software stack that is fully memory safe, it is more a matter of restricting the memory unsafe parts in fewer, more scrutinized, better contained sections.

▲zamadatix an hour ago | parent | next [-]

Yeah, "memory safe" goes out the window if you prefer to implement parts in assembly. This is where portable SIMD (e.g. the Java vuln was from SIMD), which is abstracted & safe but not necessarily as performant as it could be, is becoming a more reasonable trade off.

Of course I'm not sure how much it counts to be "using a memory safe language" when you have to call put to unsafe code anyways. I.e. just because the library you'd like to use is C but the rest of your project is Rust doesn't mean you're really using a me ory safe language, it means you're sometimes using one. We have a long way to go before environments allow using memory safety fully I think.

▲ninkendo 36 minutes ago | parent | prev | next [-]

OP didn’t say anything about Rust, by the way. This post comes off as being defensive about a point nobody made.

▲anthk 43 minutes ago | parent | prev [-]

Rust it's far better than Java. Since the old times Java was seen as a CVE generating machine for GNU/Linux environments.

▲cowlevel 13 minutes ago | parent | next [-]

Java CVEs were mostly holes in Java's own sandbox (e.g. used to run multiple applets from different websites in the same VM) which has been abandoned.

▲dcminter 16 minutes ago | parent | prev [-]

This ... isn't true? A lot of people perceived the Java plugin as being insecure in the browser, and indeed it was.

The perception of Java as being insecure on the server was only a thing amongst those who hadn't used it much since the Java plugin era.

That's why the Log4j vulnerability was a huge deal.

I like Rust, but this kind of anti-Java-think is super dated and boring.

▲toastal an hour ago | parent | prev | next [-]

I like your comment since it points out that we need to enforce the memory situation—but it doesn’t prescribe Rust is the only solution.

▲jjgreen 17 minutes ago | parent [-]

Heretical

▲boomlinde an hour ago | parent | prev | next [-]

From my understanding it's only a single byte overflow if your payload only contains a single ß.

▲yuliyp 24 minutes ago | parent [-]

From the pseudocode it's always a single byte. Desyncing before the end of the buffer is fine. Desyncing at the very end causes the single byte overflow.

▲miohtama 2 hours ago | parent | prev | next [-]

This is bad news for C/C++

▲lionkor 3 minutes ago | parent | next [-]

The good news is that this was already the case, and we have tools that check for this; like fuzzers and sanitizers.

Now to get people to use them it's an issue.

▲xnickb an hour ago | parent | prev | next [-]

This is bad news for computer industry. See the recent Java4Shell.

▲eecc an hour ago | parent [-]

because the assembly for the base64 decoding was handwritten, the paren't comment is still valid

▲dingaling911 an hour ago | parent [-]

I think the point is that the weakest link WILL be found.

▲anthk 43 minutes ago | parent | prev [-]

At least C folks can use something like BoehmGC and calm down things a little.

▲trismegisti 2 hours ago | parent | prev [-]

But are those generic exploits, that don't rely on specific dynamic library and kernel versions? i doubt it.

▲zamadatix 28 minutes ago | parent [-]

The problem now is it really doesn't matter as much. Before you had to put the work in to make the exploit chain work in the specific situation. Now you just need the entry point through the narrow hole in the exposed portion and a target set worth the tokens to customize it to work against one of the individual deployments. At least until we get better at making it difficult to chain things in response.