Live data from Hacker News

Microsoft: 70 percent of all security bugs are memory safety issues

zdnet.com

111–120 of 180 posts

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#111
post #34

Earlier quoted context omitted.

And it has MORE reported CVEs than Windows: https://www.cvedetails.com/top-50-products.php?year=2018

Maybe because more people can report them? With Windows you'll be lucky if Microsoft doesn't outright deny their existence.

That and saying Debian isn't like saying Windows. Debian is like 50.000 packages. Pretty much all CVES in this year so far listed as Debian CVES has been in Google Chrome browser...

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#112

Earlier quoted context omitted.

sel4 shows that an endgame is possible wrt to memory safety, it's formally verfied to be memory safe. It's sitting at ~25 to 1, proof code to implementation code. I think you could probably get that down to 5 to 1 or so by treating a lot of the work they did as a library. The proof covers a full equivalence from abstract spec to machine code, and you could reuse a lot of that. Sort of how it's not fair to include the…

But does formal verification even help when you're up against side channel attacks on the hardware? Like the branch predictor or DRAM memory access timing.

[deleted]

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#113
post #77

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++.

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 arou…

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 safety issues

#114
post #34

Linux is also written in C.

And it has MORE reported CVEs than Windows: https://www.cvedetails.com/top-50-products.php?year=2018

When the list says Debian or Ubuntu it includes all software in Debian and Ubuntu. That includes software like Google Chrome, Firefox, Python, Ruby, etc. For example out of the 40 listed in 2019 in Debian 36(!) are Chrome bugs, not Debian bugs.

Sort by Vendor: https://www.cvedetails.com/top-50-vendors.php

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#115
post #76

As an industry we should deprecate all unmanaged code. We've proven time and time again that even very professional and highly scrutinized unmanaged code can have critical data safety faults. Yes, I understand this includes Linux, Windows, BSD, Darwin (iOS, MacOS, watchOS, etc), The Android Runtime, and lots of critical software that runs on top of those systems. We have the tools to write very efficient managed code…

> The cost of these security flaws is likely to become more expensive than the cost of replacing the existing software.

I think that you massively under-estimate the cost of rewriting all that code. Yes, the security flaws are expensive. Rewriting the code would be, I'd guess, at least one order of magnitude more expensive.

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#116
post #71

Earlier quoted context omitted.

It's also OSS and it is much easier to surface security bugs for Linux than for Windows. In my own research, I have attempted to send Microsoft security bugs only to be told they would be backlogged and reviewed later (which never happened to my knowledge).

> It's also OSS and it is much easier to surface security bugs for Linux than for Windows. Shouldn't then the number of bugs decrease much faster, since they are easier to find? Unless they are introduced at even a greater rate than the ones in Windows.

You are right. One current estimate is that Linux is introducing security bugs at a rate faster than they are fixed.

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#117

To quote the article: ``` Furthermore, as Microsoft has patched most of the basic memory safety bugs, attackers and bug hunters have also stepped up their game, moving from basic memory errors that spew code into adjacent memory to more complex exploits that run code at desired memory addresses, ideal for targeting others apps and processes running on the system. ``` Is all we can hope for in the security game a seri…

Computer security is a fundamentally asymmetric game. Your entire stack needs to contain zero mistakes and an attacker only needs to find one. Also the resources you would expend trying to find and patch every last hole would break the economics. It is what it is.

>Also the resources you would expend trying to find and patch every last hole would break the economics.

If people built with things that weren't made of holes (ie. using memory safe languages), then there wouldn't need to be much effort in the "find and patch" side of things.

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#119
post #94
post #30

Earlier quoted context omitted.

Microsoft already have what you're talking about; it's called Windows IoT Core. (This is in contrast to Windows IoT Enterprise, which is the more traditional "Windows Embedded" experience with many of the features you're complaining about. This is mostly because Enterprise customers want to be able to slap their coded-for-a-desktop apps onto a kiosk and declare the job done.)

I have never heard about IoT Core before, only IoT enterprise and LTSC. This would actually have been an interesting choice for the project I am working on right now. It's really infuriating how many versions MS is cranking out without clear differentiation between them and even when you talk to MS reps they know nothing about the options.

IoT core is not new, not a secret, and Microsoft makes no effort to hide it.

Your MS reps need to be fired if they do not know about IoT Core, or chose not to tell you.

Also, I personally find it best to never rely on a rep from any company to give me the truth about their product line. I will make time to do preliminary research (at least) myself.

Microsoft will ALWAYS push IoT Enterprise over IoT Core because IoT Core costs nothing, and generates no revenue for Microsoft (other than the associated Azure revenue that they hope you spend connecting those IoT Core devices to infrastructure.)

All that said, I recommend looking into IoT Core if it interests you. It is very well suited for certain kinds of use cases.

Re: Microsoft: 70 percent of all security bugs are memory safety issues

#120
post #99
post #69

Earlier quoted context omitted.

That's not an endgame if the resources required to block an attack are significantly greater than those required to make one. Moreover, verification is done with respect to specific properties that ensure no attacks of a particular kind . The more kinds of attacks you need to defend yourself from, the harder you need to work (and you will miss some). Not saying we're not making steps in the right direction, but no on…

> Moreover, verification is done with respect to specific properties that ensure no attacks of a particular kind. No. seL4 proved functional correctness. It eliminates all attacks, not just particular kinds. Functional correctness means implementation matches specification. As a corollary, seL4 has no buffer overflows. Proof: Assume seL4 has a buffer overflow. Exploit it to run arbitrary code. Arbitrary code executio…

I read this and thought, "this can't be right, they must be assuming some things."

According to them, they, sensibly, are indeed assuming some things to be correct without proof: http://sel4.systems/Info/FAQ/proof.pml

This is effectively the same idea behind Rust's `unsafe`. It represents the things you assume to be true. Of course, when compared to seL4, the scales are massively different. :-)

Post reply on HN