Live data from Hacker News

Incident Report: CVE-2024-YIKES

nesbitt.io

181–187 of 187 posts

Re: Incident Report: CVE-2024-YIKES

#181
post #80

Earlier quoted context omitted.

Why? Honest question. Commons, Guava, Spring, and more seem to take this approach successfully (as in, the drawbacks are outweighed by the benefits in convenience, quality, and security) in Java. Are benefits in binary size really worth that complexity? And before someone says “just have a better standard library”, think about why that is considered a solution here. Languages with a large and capable standard library…

Why? It's the essence of "Simple Made Easy": you don't have other code to complect with. You have a smaller interface, focused on a singular goal. When a library has to work as a standalone project, it can't be accidentally entangled with other components of a larger project. Smaller implementations are also easier to review against malware, because there are fewer places to hide. You don't have to guess how a compon…

worth clarifying the build parallelism is because the fundamental unit of compilation in rust is the crate. so the main option available to cut down the running time of a large crate is to split it into smaller crates.

Re: Incident Report: CVE-2024-YIKES

#182
post #119

Earlier quoted context omitted.

would not be difficult Surely that's why we see evidence of all these build script attacks, since it's so easy?

I had pondered the same thing about other package ecosystems in the past, in general. Now with the benefit of hindsight we can comfortably say that the absence of known (!) attacks doesn't really say anything about how relatively difficult an attack would be. Are -sys crates, or build script attacks, particularly potent? Who knows. When I did a cursory search, the only attempts I saw were at runtime rather than build…

ou can defend a claim that literally anything is a supply-chain risk from this logic. Don't use vim to edit your config files because you don't have any way to know that someone couldn't slip a "reflections on trusting trust" compiler attack into clang so that your MacOS binary distributed by homebrew detects when you're editing an npm.json and exfiltrates your ssh keys so that they can push rogue builds!

Re: Incident Report: CVE-2024-YIKES

#183
post #182
post #119

Earlier quoted context omitted.

I had pondered the same thing about other package ecosystems in the past, in general. Now with the benefit of hindsight we can comfortably say that the absence of known (!) attacks doesn't really say anything about how relatively difficult an attack would be. Are -sys crates, or build script attacks, particularly potent? Who knows. When I did a cursory search, the only attempts I saw were at runtime rather than build…

ou can defend a claim that literally anything is a supply-chain risk from this logic. Don't use vim to edit your config files because you don't have any way to know that someone couldn't slip a "reflections on trusting trust" compiler attack into clang so that your MacOS binary distributed by homebrew detects when you're editing an npm.json and exfiltrates your ssh keys so that they can push rogue builds!

Did you reply to the correct parent comment?

Re: Incident Report: CVE-2024-YIKES

#184
post #183
post #182

Earlier quoted context omitted.

ou can defend a claim that literally anything is a supply-chain risk from this logic. Don't use vim to edit your config files because you don't have any way to know that someone couldn't slip a "reflections on trusting trust" compiler attack into clang so that your MacOS binary distributed by homebrew detects when you're editing an npm.json and exfiltrates your ssh keys so that they can push rogue builds!

Did you reply to the correct parent comment?

Yes. Your comment reads to me as a defense of the comment above the one you replied to:

>>> sys crates are also mostly generated and lack a lot of eyeballs. Sneaking something into the build.rs of a sys crate would not be difficult and would land in the builds of everything downstream of it.

>> Surely that's why we see evidence of all these build script attacks, since it's so easy?

> Now with the benefit of hindsight we can comfortably say that the absence of known (!) attacks doesn't really say anything about how relatively difficult an attack would be.

Given that you were responding to a critique of what seems to be fully conjecture with the argument that we don't know for sure that it's not feasible, it's not clear to me why that wouldn't be a sufficient defense of any claim of a potential vulnerability without regard for merit. You don't propose any alternative than ignoring the only hard evidence we have, so although you might not have intended it this way, it's not clear to me what discussion you could expect to happen with that standard of evidence other than throwing up our hands and saying everything is screwed.

Re: Incident Report: CVE-2024-YIKES

#185

Earlier quoted context omitted.

"left-justify" absolutely slayed me :)

i think i might be missing some reference/joke obviously it's referencing the left-pad incident[0], and to 'justify' text is another kind of text manipulation[1]; but with the more common definition, i guess it's a joke about justifying something? The Left? idk [0] https://en.wikipedia.org/wiki/Npm_left-pad_incident [1] https://en.wikipedia.org/wiki/Typographic_alignment#Flush_le...

No, the meaning is straightforward. It's a joke because the audience is assumed to write in a left-to-right script (such as English), such that text is already left-justified by default.

Re: Incident Report: CVE-2024-YIKES

#186
post #184
post #183

Earlier quoted context omitted.

Did you reply to the correct parent comment?

Yes. Your comment reads to me as a defense of the comment above the one you replied to: >>> sys crates are also mostly generated and lack a lot of eyeballs. Sneaking something into the build.rs of a sys crate would not be difficult and would land in the builds of everything downstream of it. >> Surely that's why we see evidence of all these build script attacks, since it's so easy? > Now with the benefit of hindsight…

> Given that you were responding to a critique of what seems to be fully conjecture with the argument that we don't know for sure that it's not feasible,

But wait, that isn't what's on the table. Inserting malware into a build script itself is absolutely feasible; you can demonstrate that part locally. Gaining sufficient access to a developer or CI machine that has credentials to publish such malware to package repositories is also, well, feasible. If you are using GitHub Actions, all it would take is literally any action you run in any CI script in a job leading up to publishing getting pwned, a task that is easy if you can compromise any one of them due to the lack of a real way to pin actions, and because of vectors like the ever-enduring pwn request.

The unknown quantity is how easy it is. That part is hard to say, and also inherently relative. For me pulling off such an attack would probably be hard. For the folks behind the XZ backdoor? Well, I do not wield a crystal ball, but it sure seems like what they accomplished for that was significantly more than what would've been needed to pwn the Rust ecosystem. They didn't even need temporary access to publish a crate, they flat-out took over an upstream the old fashioned way; found a weak link and worked their way up the chain with social engineering and good old hard work.

What exactly makes you think the feasibility of pwning a crate is somehow up for debate?

> it's not clear to me why that wouldn't be a sufficient defense of any claim of a potential vulnerability without regard for merit.

You have inverted my logic. What I said was that the absence of an attack is not evidence of difficulty (or infeasibility).

> You don't propose any alternative than ignoring the only hard evidence we have,

What you have isn't "hard evidence" at all. It's not evidence in the first place. It is the literal lack of evidence.

This shouldn't be comforting. I suggest it shouldn't be comforting, because there is a period of time from whence a package repository goes online to its first major supply chain attack attempt, and you never really know when it will be. Crates.io is currently vastly smaller and lower traffic than NPM for example, so if you are looking for a vast number of potentially easy targets it is the wrong place to look. That may not always be true and to some attacker it may not matter as much. It isn't just inherently safe.

> so although you might not have intended it this way, it's not clear to me what discussion you could expect to happen with that standard of evidence other than throwing up our hands and saying everything is screwed.

The main takeaway is that hope is not a strategy. Will crates.io get pwned like NPM does periodically now? Probably. Can we do anything about this? Sure, lots of things, although I'm not sure people will love them.

- You could abandon a unified namespace/central repository and mimic Go's approach. Doesn't prevent compromise, but it helps avoid issues like typosquatting.

- You could require secure attestation of the build process. Don't mistake this suggestion as me vouching for it, but Bazel has implemented this for BCR.

- You could... Have moderated, curated repositories, possibly with graduated release channels like Linux distros do. Again... Could, not should, but it absolutely helps enable more scrutiny and time for things to bake. It's feasible.

- You could enforce reproducible builds with provenance information. This would stop someone from publishing releases that don't match the actual source repo, a technique often used in these supply chain compromises.

As for what Crates.io should do, I don't know. All I know is it would be a huge mistake to just do nothing and assume it won't get pwned due to the absence of attacks. Security will never be perfect. Best we can do is acknowledge this and continue to iterate.

Re: Incident Report: CVE-2024-YIKES

#187
post #159
post #93

Earlier quoted context omitted.

Searching for CVE-2024-YIKES also provides a gallery of AI slop blogs that AI-rewrite the content of this post while being absolutely stone cold serious about it.

lmao https://youtu.be/-4-lDiCH0s8 https://youtu.be/ENYYI6eq4w0 pure slopnet

I want out of this absurd reality.
Post reply on HN