Deciding to rewrite getaddrinfo in rust
It boggles the mind how utterly misguided the &quot;let&#x27;s rewrite everything in Rust!&quot; people are when it comes to understanding security and its implications.<p>Let me begin by introducing my premise: Rust will do NOTHING for security, it is not an improvement in any way, and at least as far as security is concerned, it will lead to at best colossal time waste, at worst actively damage the cause <i>by misdirection, making ppl feel warm and fuzzy, providing illusion of security</i>.<p>What??? B-b-but memory safety, I hear you say. How can this even be possible I hear you cry.<p>Memory safety (assuming that Rust completely solves it, which it absolutely DOES NOT) is but one (small) piece of the entire puzzle. In the same way that the skilled craftsman knows that he can&#x27;t build a castle on top of sand, the skilled (and security conscious) software engineer <i>should</i> realize that memory corruption (and race conditions in the same unit&#x2F;process) are not the foundation
of the security chain. I dare say that a lot of the bugs exploited out there today (but not necessarily made public), are pure LOGIC bugs (that include race conditions) that stem from the interactions between extremely complex autonomous subsystems. Rust is simply operating at a too high-level abstraction layer to deal with any of these issues. This is the logical progression of Sergey Bratus&#x27;s weird machines taken to the next level.<p>Some examples:<p>The Linux kernel.
Any UNIX operating system taken as a whole.
Any Windows taken as a whole.
Any OSX system.<p>Anything built on top any of the above. Anything built on 
<i>combinations</i> of any of the above. Weird machines are not limited to
isolated units, you know, they very well exhibit EMERGENT behavior.<p>Are you starting to get the picture now?<p>And then of course we <i>still</i> have the bugs that stem from unsafe languages, as long as there&#x27;s a path that cuts through all the intermediate layers of &quot;safe&quot; code. Graphics drivers and webgl anyone? Truetype in the kernel?<p>Rust has plenty of things in its favor but to position it as a cure for issues 
that it doesn&#x27;t even know how to address is a colossal mistake. We have given rise to a beast that threatens to consume us all. It&#x27;s one thing to despair
due to the immense complexity of the domain and quite another to step into
an imaginary realm and solve illusionary problems that we create just to feel &quot;safe&quot;.