5 ms·
> As Rust is designed for sensitive applications where reliability is important such as embedded or blockchain-like projects, it can raise concerns. This is wh
by rvz 5y ago
> As Rust is designed for sensitive applications where reliability is important such as embedded or blockchain-like projects, it can raise concerns.
This is why I get very concerned with Rust projects using tons and tons of external crates. Especially cryptocurrency projects using Rust.
These sort of techniques can be used to compromise lots of them at once which in the very worst case can lead to loss of funds and is irreversible.
Unfortunately we will see the same issues found in NPM be found in crates.io with cargo.
Oh dear.
- natded 5y agoThis is an issue with any ecosystem. The alternative would be to have them in standard library which is silly. The actual solution I guess are domain specific languages.
- rvz 5y ago> This is an issue with any ecosystem. So repeating the same mistakes that NPM has into other package managers? We have therefore learned nothing at mitigating these supply chain issues then. > The actual solution I guess are domain specific languages. Any production real world examples of this?
- oytis 5y agoWith any ecosystem that has a packet manager. Try inserting a dependency backdoor into a C++ project where dependencies have to be managed manually (and consequently are few)
- ziml77 5y agoOf course if they need to be manually updated, there's a strong likelihood that they are using vastly outdated versions of their dependencies. Users could be wide open to unpatched exploits.
- oytis 5y agoNot necessarily. C/C++ relies vastly on dynamic linking which means keeping your dependencies up to date will be outsourced to distro maintainers. You'll have to make sure that your package builds for new versions of the distro.
- notriddle 5y agoC relies vastly on dynamic linking. C++ cannot dynamically link templates, so it's pretty common for a C++ library to be made entirely of header files. Also, that's really only true of a small number of Linux and BSD flavors. Applications shipped on Windows, macOS, Android, iOS, or any of the Linux "application bundle" systems like the Steam runtime, Docker, FlatPak, will deliberately avoid using globally-specified dependencies. It's also commonplace to avoid declaring dependencies in C by vendoring them, like how VLC basically includes its own implementation of a bunch of data structures [1], and the entire universe of single-file libraries [2]. [1]: https://wiki.alopex.li/LetsBeRealAboutDependencies#gotta-go-deeper https://wiki.alopex.li/LetsBeRealAboutDependencies#gotta-go-... [2]: https://github.com/nothings/stb/blob/master/docs/stb_howto.txt https://github.com/nothings/stb/blob/master/docs/stb_howto.t...
- ziml77 5y agoThat first link is a good analysis of the situation when it comes to dependencies. It's really not straightforward unless you are targeting a specific OS distribution.
- oytis 5y agoC++ ABI is PITA indeed, but exposing a C API for external linking is totally possible and is being actively used. Various cases of static linking (or header-only files) do indeed exist, but no sane C++ project (I'm not sure one can call ROS that without reservations) uses nearly as many static dependencies as typical Rust one does. > Also, that's really only true of a small number of Linux and BSD flavors. This is true on all major Linux distributions. > Applications shipped on Windows, macOS, Android, iOS If we are talking about security closed-source walled gardens are out of consideration right? > or any of the Linux "application bundle" systems like the Steam runtime, Docker, FlatPak This is sad indeed. Docker used right is just a distro inside a distro though, so anything that applies to distros applies here too.