Live data from Hacker News

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

zdnet.com

91–100 of 180 posts

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

#91
post #89

It's a pity Modula-2 did not gain wider adoption 30 years ago - it has almost all the memory safety of managed languages and none of the performance penalties. Array bounds were checked by compiler and the only available unsafe operation was deallocate, all other unsafe operations were sequestered into separate module which could be easily isolated, audited, and/or banned as appropriate. Life could have been so much…

Luckily now we have Rust! :)

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

#93
post #89

It's a pity Modula-2 did not gain wider adoption 30 years ago - it has almost all the memory safety of managed languages and none of the performance penalties. Array bounds were checked by compiler and the only available unsafe operation was deallocate, all other unsafe operations were sequestered into separate module which could be easily isolated, audited, and/or banned as appropriate. Life could have been so much…

Luckily now we have Rust! :)

30 years of pain tho? Plus however many more years it will take to phase out existing C-based code, so another 30 at least.

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

#94
post #30
post #9

Earlier quoted context omitted.

I'd strongly prefer that my ATM had no start menu, file picker, online help system, interactive parts of update system, or any of the thousands of other UI apps which could be exploited via touchscreen if accidentally activated. Singlularity would be cool, but I'd prefer smaller footprint to begin with.

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.

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

#95
post #93

Earlier quoted context omitted.

Luckily now we have Rust! :)

30 years of pain tho? Plus however many more years it will take to phase out existing C-based code, so another 30 at least.

I think Ada was type-safe too, agreed re: 30 misspent years, and here's hoping it doesn't take 30 more to get where we need to be.

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

#96
post #2

we should all be using Rust then :)

> Microsoft: 70 percent of OUR security bugs are memory safety issues Fixed the title. This is not an analysis about general software errors.

But seems to be a close match.

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

#97
post #93

Earlier quoted context omitted.

Luckily now we have Rust! :)

30 years of pain tho? Plus however many more years it will take to phase out existing C-based code, so another 30 at least.

Look to the future and try to build it on the lessons of the past. Dont worry about the missed opportunities, if anyone knew in advance C and C++ would not have been used the way they were.

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

#98
post #93

Earlier quoted context omitted.

Luckily now we have Rust! :)

30 years of pain tho? Plus however many more years it will take to phase out existing C-based code, so another 30 at least.

It depends how it gets prioritized by the companies that own and contribute to these codebases - both open and private source. Right now there's not much incentive financially to migrate away from any of the existing code, so more often than not it will not happen.

One reason why we're seeing stuff like the [FirecrackerVM](https://firecracker-microvm.github.io) or [AzureIoTEdge](https://github.com/Azure/iotedge) is that the companies behind them know they will attract privacy-/security-minded customers they might not otherwise have.

There's other reasons as well, but this is just what stands out to me first.

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

#99
post #69

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…

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 execution is not part of specification, hence implementation does not match specification, leading to contradiction. QED.

Above proof applies to use after free, or any other exploits enabling arbitrary code execution, including methods which are not discovered yet.

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

#100

Earlier quoted context omitted.

No, just use Rust...

Well, that wouldn't eliminate everything (row-hammer, speculative execution), but it would probably get rid of the most common culprits - buffer overflows and use after free.

Things like row hammer will not get attention until they are commonly used. Rust does eliminate the most common vulnerabilities and should be seriously considered for any new project that would otherwise be written in C.
Post reply on HN