Post #1971051
2026-05-04 09:13 UTC
Replies (4)
-
@slomo@toot.cat 2026-05-04 10:36
@zeenix @pid_eins Most CVEs are completely uninteresting though, and also the CVE ratings are imaginary numbers that have little to do with reality. I think what Lennart refers to here is issues with actual bad impact, and many memory safety issues are clearly not that unless you're a security researcher.
-
@jamesh@aus.social 2026-05-04 10:45
@zeenix @pid_eins You could argue that representing open files as simple integer file descriptors, since all the kernel syscalls produce well defined errors. But there are obvious benefits in wrapping the descriptor in a type that extends Rust's lifetime and memory access restrictions to those descriptors. If all code is using that abstraction, you don't have to worry about file descriptor reuse bugs, or other threads accidentally manipulating your descriptor. Is it that outlandish to want similar lifetime guarantees for files themselves? And the usual reason for wanting this kind of thing in the standard library is that if the default way to access files avoids race conditions, then third party code built on top is more likely to do the same.
-
@pid_eins@mastodon.social 2026-05-04 15:41
@zeenix open claude, type in "Give me 10 recent cves where path traversal issues were the cause". Gives you 10 great examples, recent ones. Not that hard.
-
@AdrianVovk@fosstodon.org 2026-05-04 16:22
@zeenix @pid_eins I think there are valid things to criticize Rust for, and std's filesystem APIs is one of those things. Rust also eliminates a massive category of vulnerabilities and significantly improves security posture. Both can be true at once. Pretending that it's not a problem isn't going to help push projects like systemd towards a direction where we start using Rust. In fact, probably the opposite.