Remix.run Logo
▲ gspr an hour ago

Very interesting finds for sure. But taking the "trusting user-provided code" as an example: isn't this just a case of malicious code being malicious? I understand the point that the malicious act comes through memory unsafety, and it's a big gotcha that safe Rust (i.e. Rust without `unsafe`) can trigger memory unsafe behavior. But the code doing it is still acting maliciously (by having an `AsRef` implementation that returns different slices at different times). And the code being abused (the one that does the unsafe indexing) does have `unsafe` – so this is a case of the user writing unsafe Rust that interacts with malicious safe Rust.

I don't know if it's ever been in Rust's threat model to handle malicious code.

▲pwdisswordfishq 17 minutes ago | parent | next [-]

Sufficiently deniable malice is indistinguishable from incompetence. If a condition can be triggered "maliciously", then it can probably be also triggered inadvertently. There's no point in saying "that's malicious so it doesn't count".

▲dist-epoch 3 minutes ago | parent | prev [-]

Only JavaScript partially supports this, based on the domain where the code originated from, so your website code is not infected by the Javascript run by an ad you embed.