News for hackers. Stuff that matters.
Re:Microsoft: 70 percent of all security bugs are memory saf... by ilovecaching on Monday February 11, 2019 @07:27PM (#19139898)
Rust couldn't solve all of these bugs, but it certainly would have drastically reduced the total amount. The code would also be drastically easier to write and debug. C++17 is still a total mess to write, despite what Microsoft might tell you in their docs. Really doesn't make sense to me, outside of the sunk cost fallacy, why Microsoft isn't pivoting to Rust if they want to write C++.
Re:Microsoft: 70 percent of all security bugs are memory saf... by sumitgt on Monday February 11, 2019 @07:36PM (#19139947)
Microsoft probably has tons of internal libraries that are modified and shared between many different teams spanning multiple orgs.

I think a pivot like this is an incredibly complicated thing for a company like Microsoft to perform. It requires multiple years of planning from the ground up to port internal libraries and tooling, train engineers on Rust best practices.

Not to mention the tricky business of going around and hiring Rust developers at the scale MS needs. :)

I think, simply waking up one day and changing the language / frameworks / tools used by your company is a privilege only smaller companies and startups might enjoy.

Re:Microsoft: 70 percent of all security bugs are memory saf... by duneroadrunner on Monday February 11, 2019 @08:32PM (#19140251)
Replacing existing unsafe C++ elements with compatible memory safe substitutes[1] might be more expedient. The conversion can even be automated[2] for parts of the code that aren't performance critical.

[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus

[2] https://github.com/duneroadrunner/SaferCPlusPlus-AutoTransla...

Re:Microsoft: 70 percent of all security bugs are memory saf... by ilovecaching on Monday February 11, 2019 @10:00PM (#19140629)
I'm not a fan of these types of efforts. You could be putting energy into making Rust better. Memory management aside, C++ has become an incomprehensible mess filled with cruft. Rust does much more than provide safety, it provides better abstractions, a better type system, and actual tooling. Building tools for C++ to keep the ship afloat just means we have to deal with writing C++ longer.
Re:Microsoft: 70 percent of all security bugs are memory saf... by ilovecaching on Monday February 11, 2019 @07:46PM (#19139996)
I would imagine that we would at least hear about Microsoft doing some new projects in Rust, or at least using it in some capacity to understand the cost/benefits better. I'm sure the first step would be increasing C++ interop.
Re:Microsoft: 70 percent of all security bugs are memory saf... by sanxiyn on Monday February 11, 2019 @07:46PM (#19140001)
> I would imagine that we would at least hear about Microsoft doing some new projects in Rust

We did.

Re:Microsoft: 70 percent of all security bugs are memory saf... by sanxiyn on Monday February 11, 2019 @07:45PM (#19139995)
Microsoft is using Rust for greenfield projects: https://github.com/Azure/iotedge
Re:Microsoft: 70 percent of all security bugs are memory saf... by pjmlp on Tuesday February 12, 2019 @03:26AM (#19141943)
Microsoft is a big C++ shop, we would all be running AOT compiled .NET code post Windows Longhorn if it wasn't for the political wars between DevDiv and WinDiv.

Just notice that on current desktop and mobile OS SDKs, Windows is the only one where C++ still gets a place at the GUI table. Everywhere else it just got pushed down the stack.

So while some divisions would like a world of purely .NET (AOT/JIT compiled), others would rather that it did not exist.

Re:Microsoft: 70 percent of all security bugs are memory saf... by coldcat on Monday February 11, 2019 @07:40PM (#19139964)
you could ask the same question for every os. And none choose Rust even the recent like fushia. BTW go ask Linus to switch to Rust I'm waiting for you there.
Re:Microsoft: 70 percent of all security bugs are memory saf... by ilovecaching on Monday February 11, 2019 @07:47PM (#19140003)
Fuchsia is using Rust for some pieces. That's what I assume MS would do. MS is a company with tons of products, not just an OS, and certainly not a single monolith. You wouldn't rewrite everything in a day, you would slowly move things over time.
Re:Microsoft: 70 percent of all security bugs are memory saf... by pjmlp on Tuesday February 12, 2019 @03:57AM (#19142059)
Linus is never going to switch to anything else other than C, UNIX is married to C.

So it is always going to be something else, not UNIX related.

Fuchsia uses Rust and Go in several areas.

Microsoft is using Rust on VSCode, Azure and IoT Core.

Re:Microsoft: 70 percent of all security bugs are memory saf... by sanxiyn on Monday February 11, 2019 @07:52PM (#19140033)
Fuchsia implements TCP/IP stack in Go. It is an improvement over others.
Re:Microsoft: 70 percent of all security bugs are memory saf... by gnuvince on Tuesday February 12, 2019 @07:21AM (#19142906)
> Rust couldn't solve all of these bugs, but it certainly would have drastically reduced the total amount.

Well there's certainly a chronological argument that it couldn't have, but I agree with the sentiment. It saddens me that our industry is one in which people _do_ let perfect be the enemy of better.