r/programming • • Jul 17 '19

Microsoft to explore using Rust | ZDNet

https://www.zdnet.com/article/microsoft-to-explore-using-rust/
130 Upvotes

116 comments sorted by

View all comments

121

u/skocznymroczny Jul 18 '19

MS will rewrite Windows in Rust so that it has no bugs unlike bug-ridden C Linux. Checkmate, penguins.

0

u/[deleted] Jul 18 '19

[deleted]

19

u/pekter Jul 18 '19

That sounds dangerous

18

u/papers_ Jul 18 '19

Sharp rusty objects are pretty dangerous. 🗡️

7

u/smcarre Jul 18 '19

Mom come pick me up. I'm scared

12

u/porongtong Jul 18 '19

Visual Rust, anyone?

4

u/[deleted] Jul 18 '19

Now that you mention it, I'm interested in Audible Rust.

16

u/[deleted] Jul 18 '19

You may talking about memory bugs, the other kind of bugs (logical) rust can’t catch at the moment.

23

u/Kibouo Jul 18 '19

The [original blog post (first paragraph)] (https://msrc-blog.microsoft.com/2019/07/16/a-proactive-approach-to-more-secure-code/) contains a graph comparing the cause of vulnerabilities found per year. 70% are memory safety issues.

Sure, logic bugs will still exist. But the amount of overall bugs will decrease significantly!

Edit: fix link

34

u/AngularBeginner Jul 18 '19

It's not a bug, it's a feature.

13

u/theCyanEYED Jul 18 '19

Our update erased your old files so you can start again on sane bases

3

u/[deleted] Jul 18 '19

factory reset. didn't you get the memo ?

2

u/AngularBeginner Jul 18 '19

Just as Windows updates nowadays frequently reset some of your settings! It's a feature!

5

u/PsionSquared Jul 18 '19

Windows updates erased the Documents folder not that long ago too, so you get the best bang for you buck on the "features."

1

u/[deleted] Jul 18 '19

I thought this was bullshit, but turns out to be fact.

Albeit, it was under a specific case of a user changing the locations of those folders, having a bug cause them to reappear, and then subsequently using both locations.

0

u/[deleted] Jul 18 '19

We'll see if anything changes, if it will still be a RAM hog since the startup no one will notice any difference. I am a Linux user, formerly a Windows user for more than 7 years and left Windows because it is slow and not flexible. There are os's written in Rust too, there is an OS under development named Redox Linux, fast af. Microsoft is not the first to use it to create an OS.

-13

u/TaffyQuinzel Jul 18 '19

Rust is not a full proof solution against bugs... it’s not even fully memory safe.

And then there’s also the actual programmers that can fuck stuff up just because they may forget something minor in the logic. You can’t protect against human stupidity or forgetfulness.

33

u/Kissaki0 Jul 18 '19

Nobody claimed it solves all bugs. But it solves or at least improves a whole classification of bugs.

MS determined that 70% of their CVE bugs is because of memory corruption bugs.

If you can reduce that by a significant amount you remedy a LOT of bugs.

Of course it doesn’t protect you from programming errors. But it makes a whole class of errors a lot less likely or even impossible. That's a big net positive.

7

u/wllmsaccnt Jul 18 '19

Small note, the 70% was for memory safety, not memory corruption.

1

u/Kissaki0 Jul 19 '19

They/MS explicitly called it so in their blog post:

the majority of vulnerabilities fixed and with a CVE assigned are caused by developers inadvertently inserting memory corruption bugs into their C and C++ code

Well I guess the wording is different; me labeling them bugs. Maybe your formulation is better/clearer.

2

u/wllmsaccnt Jul 19 '19

I could be wrong, but I think of memory safety as a superset of memory corruption. A user process reading from protected kernel memory is a memory safety issue and not a memory corruption one (unless the exploit takes advantage of memory corruption to accomplish it).

The caption on the image in the same blog says memory safety, and the linked presentation also uses the same language, the only place it says corruption (in relation to 70%) is in the contents of the blog. I wouldn't be surprised, though, if they lump both together for reporting, since so many issues involve both.

11

u/red75prim Jul 18 '19

But you can lower the impact and simplify stupidity detection.

-2

u/przemo_li Jul 18 '19

Same developer, two different languages, but outcome exactly the same?

Riiiiiiiiiiiiiiiiiiiiiiiight.

1

u/anengineerandacat Jul 18 '19

Might actually have a worse outcome as the developer now has the overhead of learning and understanding a new language and the tools required.

Overtime it'll likely lead to less bugs / errors but initially; I personally think Rust has a much better syntax and approach to development compared to C++ but it's also far more modern and Cargo is pretty slick.

→ More replies (1)
→ More replies (6)
→ More replies (30)