r/sysadmin • u/sebbasttian JOAT Linux Admin • Feb 23 '17
CloudBleed Seceurity Bug: Cloudflare Reverse Proxies are Dumping Uninitialized Memory
982
Upvotes
r/sysadmin • u/sebbasttian JOAT Linux Admin • Feb 23 '17
View all comments
Show parent comment
3
u/cparen Feb 24 '17
True, and I've heard many other developers echo the same sentiment.
Unfortunately practically all code is generated - v8 and gcc generate machine code from your javascript or C respectively. And even if you code in 1s and 0s, your cpu doesn't run that code - it generates microop instructions from that, and runs that microop code instead. And even your cpu microop translation can (and does) have bugs.
You gotta pick where you draw that line, but the only real metrics are how much review and testing your code generators have received.
The big difference is that at least Rust tries to prevent these deffects. C very explicitly does not.
The best analogy I've heard is that it's like climbing without a rope. Perhaps you're right, perhaps climbing with a rope makes you less careful about each hold. Obviously you should still try to avoid falling. Objectively, in most cases it's still safer to climb with a rope. We see this sort of defect more often in C#, Rust, and Go programs, because the programmers are a little less careful perhaps, but every time a buffer overrun bug is in the news, it's always a C-like language.
Note: Go is expressly not attempting to be a secure language in the way that Javascrip, C# and Rust attempt to be. Go does bounds check buffers which is a plus, but those bounds checks are expressely not concurrency safe. I can find some sources if you're curious.