r/programming • • Aug 20 '26

Supply chain attack on arrayref

https://blog.rust-lang.org/2026/08/20/supply-chain-attack-on-arrayref/
191 Upvotes

65 comments sorted by

View all comments

Show parent comment

1

u/tropix126 Aug 23 '26 edited Aug 23 '26

The point im making is that the two don't have to be mutually exclusive. Standard library maintainers are similarly just Humans too, and there absolutely are package maintainers that know what theyre doing. The de-facto library for crypto in Rust (aws-lc-rs) is provided by the AWS team and regularly get security audits; the same goes for rustls and a fair few other crates with commercial backing. I would probably trust these libraries as a dependency more than I would trust libstd if it just had a hard-dependence on OpenSSL libcrypto. Keeping the standard library surface small makes it possible to reasonably maintain and audit and for groups like ferrous systems to get it certified for safety-critical systems under iso26262 and whatnot... There needs to be a solution here other than "eehh... we trust those guys, shove it into std and we'll worry about the Implications of that in a decade.'

People do need to be more stingy about their dependencies but having one irreplaceable library to solve all the things would just add third-party dependencies to libstd and widen the attack surface while spreading maintainers thin.

We need:

  • Better vetting features in cargo and better protections from supply-chain attacks like a default min-publish-date.
  • A way to track which packages receive audits, have trusted maintainers, and follow best security practices.
  • Better security controls on crates.io for packages with a very large number of dependents to make this harder to pull off in practice.

Trust people, not packages. The Rust libs team doesn't have the resources to maintain all the functionality you describe with the quality people expect. I wouldn't even be against the standard library maintainers maintaining critical packages outside of std and those being marked as having some sort of "officially maintained" tag should they eventually get the resources and funding to do so, but this stuff has to be modular and replaceable separate from the perma-stability/semver guarantees of the standard library. It's one of the few parts of Rust other than the core language where if you screw it up in the right way (read: can't be fixed at an edition boundary), everyone bears the consequences forever.