News for hackers. Stuff that matters.
Re:Microsoft is to enable Rust use for Windows 11 kernel by RcouF1uZ4gsC on Friday April 28, 2023 @05:54AM (#35739349)
Microsoft has been interested in using memory safe languages in the kernel for some time now. An example is the Midori project led by Joe Duffy back in 2009 which explored the idea with a C# derivative.

Rust is a game changer in that it is built from the ground up to offer memory safety without garbage collection and still aims for zero overhead abstractions.

It would be ironic, after their notorious security issues of the early 2000’s, if due to efforts like this, Microsoft Windows ends up being the most secure general operating system.

Re:Microsoft is to enable Rust use for Windows 11 kernel by ztnktl on Friday April 28, 2023 @06:26AM (#35739515)
>Microsoft Windows ends up being the most secure general operating system

It already is. What, exactly, is better than Windows at security features on desktop computers? Linux? There is nothing in there that comes even close to the defensive features of windows, like HVCI, a subsystem that checks for driver signatures and the likes isolated by virtualization mechanisms, which completely prevents tempering with the kernel. Linux's support for secure boot only exists to make it convenient to dual boot with windows, it doesn't do enough to prevent kernel level rootkits, it's a total placebo and it's even worse if you use a distro that doesn't have signed kernels, like Archlinux. If you're self signing on the same computer, how exactly are you stopping malware?

Since Vista, the OS also gained some serious resilience against crashes that I have never seen on other operating systems. For example, it is possible for your desktop session to survive a GPU driver crash. On linux this is a guaranteed freeze or kernel panic. This is, fortunately, a rare event, but the last times I've seen my computer freeze on linux, it was always because of the graphic stack.

openBSD's slogan for having few remotely exploitable exploits out of the box doesn't mention that it's because it has literally no features enabled out of the box.

macOS and iOS are the systems with the greatest amount of privilege escalation fails by far. In fact, what do people think jailbreaks are? Some of which are truly frightening when you think about what could have been. Multiple jailbreaks were made that could be run just by browsing a webpage on safari. This means they punched through the browser, punched through privilege escalation and had the potential to install a rootkit on your phone. Just by visiting. A. Webpage.

How many times such a thing has happened on Windows in the recent years? visiting a webpage installed a rootkit on your computer?

Re:Microsoft is to enable Rust use for Windows 11 kernel by hardware2win on Friday April 28, 2023 @06:30AM (#35739541)
Anecdote:

Ive tested a two or three years old Chrome version with JIT compiler vulnerability and guess what - on empty Linux vm it managed to escape chrome and execute code

Meanwhile on Windows with Crowdstrike software installed Chrome just showed some error message about mem. access

Im not sure who handled that attack - was it Windows or Crowdstrike, but eitherway Ive been impressed

Re:Microsoft is to enable Rust use for Windows 11 kernel by j-krieger on Friday April 28, 2023 @07:47AM (#35740113)
I can pretty much guarantee that the Windows kernel stopped unallowed memory access from chrome to outside apps.
Re:Microsoft is to enable Rust use for Windows 11 kernel by anthk on Friday April 28, 2023 @07:57AM (#35740190)
Under OpenBSD pledge and unveil would send that Chromium instance SIGABRT'ed. Your parent comment it's utterly wrong.
Re:Microsoft is to enable Rust use for Windows 11 kernel by sekh60 on Sunday April 30, 2023 @08:57AM (#35762116)
With or without SELinux enabled?
Re:Microsoft is to enable Rust use for Windows 11 kernel by hardware2win on Wednesday May 03, 2023 @04:58AM (#35799774)
Idk, that was fresh instal
Re:Microsoft is to enable Rust use for Windows 11 kernel by unnouinceput on Friday April 28, 2023 @06:56AM (#35739702)
Hold your horses there my good friend. Yes, Windows is better now than it was in the past but is still a shitty OS. None of them are actually. All of them continuously fail every single year at hackers gathering/hackatons/whatever public event, with multiple zero-day showing. Every single major OS out there is a joke from security point of view.
Re:Microsoft is to enable Rust use for Windows 11 kernel by anthk on Friday April 28, 2023 @07:58AM (#35740202)
This. Parent it's deluded if Windows can even be compared to a hardenex Guix setup with rollbacks and sandboxed Chromium/Icecat's.

I would think otherwise if Windows used virtualisation and sandboxing to run old Win32 apps from XP and below. Because lots of enterprise software depends on proper compatibility modes, and there the security gets thrown out of the window.

Re:Microsoft is to enable Rust use for Windows 11 kernel by helloooooooo on Friday April 28, 2023 @06:59AM (#35739727)
iOS has some seriously nifty security mechanisms that takes advantage of features baked into the Apple Processors. Stuff like pointer authentication and page protection layer(something akin to HVCI, without the hypervisor). Jailbreaks are getting harder and harder.

Both Windows and iOS(I can’t speak to macOS) are becoming incredibly security mature operating systems via these security mechanisms that get stacked on top of one another. Saying on is better than the other in terms of security is hard to quantify.

Windows still does have some issues with user mode logical exploitation through DLL hijacking, or issues with credential relaying, although relaying targets are generally known and mitigated by enterprises.

iOS still has issues with remote attack surface, however it has gotten better with iOS 16 and Blastdoor +Lockdown

Re:Microsoft is to enable Rust use for Windows 11 kernel by jve on Friday April 28, 2023 @07:07AM (#35739794)
I know Windows has many security features disabled by default. Where do I start to learn about them and maybe get some nice baseline recommendations for my home/office laptop?
Re:Microsoft is to enable Rust use for Windows 11 kernel by revelio on Friday April 28, 2023 @09:17AM (#35740934)
Disagree, macOS is way ahead. Windows code signing is a half-implemented joke that doesn't do much and apps can easily tamper with each other at will (unless they're installed using MSIX which not much uses), whereas macOS code signing actually works and will stop apps tampering with each other completely.

The macOS app sandbox actually works. On Windows nothing uses the app sandbox due to serious bugs and performance regressions. Chrome rolls its own sandbox for example.

SIP successfully stops macOS getting screwed up. The number of Windows installs out there in some bizarre half-broken state is incredible. It's routinely the case that API calls which work on one Windows system don't work on others even at the same patch level for no clear reason at all, which trace back to weird configuration differences to the OS.

Windows still relies heavily on client side virus scanning. Apple do malware scanning server side and then lean on their code signing and integrity systems instead, which is one reason Macs have great battery life.

And then there's all the other more well known security things Apple do with secure processors and the like.

Windows is just so far behind and they're so drowning in tech debt it's unlikely they'll ever catch up.

Re:Microsoft is to enable Rust use for Windows 11 kernel by 015a on Friday April 28, 2023 @10:03AM (#35741385)
Its difficult to quantify something like this; so obviously treat this data with proper skepticism. But: CVE Database, just looking at 2022.

- Windows 11: 498 reported CVEs in 2022. [1] - MacOS: 379 CVEs [2] - iOS: 242 [3] - Android: 897 [4]

Linux isn't as well-comparable or categorized (especially given its just the kernel, and there are dozens of other "products" which make up an equivalent to what Microsoft would call "Windows 11"). Nonetheless: 306 [5]

You should check your preconceptions and susceptibility to Apple's marketing. No one is substantially far ahead or far behind (except maybe Android, but again, these are hard to compare apples-to-apples). Everyone still experiences roughly the same class and magnitude of vulnerabilities. But, everyone is also getting better at it.

[1] https://www.cvedetails.com/product/102217/Microsoft-Windows-...

[2] https://www.cvedetails.com/product/70318/Apple-Macos.html?ve...

[3] https://www.cvedetails.com/product/15556/Apple-Iphone-Os.htm...

[4] https://www.cvedetails.com/product/19997/Google-Android.html...

[5] https://www.cvedetails.com/product/47/Linux-Linux-Kernel.htm...

Re:Microsoft is to enable Rust use for Windows 11 kernel by revelio on Friday April 28, 2023 @10:24AM (#35741625)
I'm not sure how that rebuts my point? macOS has a much lower number of CVEs than Windows. But there's a lot more to security than CVEs, and my post was about issues that CVEs don't track. BTW Apple marketing isn't what led to my views, they're based on direct experience with the security mechanisms of both operating systems up close and personal.
Re:Microsoft is to enable Rust use for Windows 11 kernel by 015a on Friday April 28, 2023 @02:10PM (#35745002)
Well, you know what they say about being too close to something to speak on it objectively. Which in this case means: there's the way these systems were designed to work, and how they actually work toward the end-goal of keeping the systems they secure, secure.

I'll believe that Apple's operating systems are significantly and measurably more secure when they can make it a few years without a maliciously formatted iMessage crashing the kernel. Until then; its arguing minutia. Everyone has security issues. Everyone is taking steps toward improving their security. No one is so far ahead that they're worth white knighting on HackerNews.

Re:Microsoft is to enable Rust use for Windows 11 kernel by seba_dos1 on Sunday April 30, 2023 @08:27AM (#35761938)
> macOS has a much lower number of CVEs than Windows

More than 75% of Windows CVEs isn't exactly "a much lower number of CVEs", even without considering its actually much lower market share.

Re:Microsoft is to enable Rust use for Windows 11 kernel by gigel82 on Friday April 28, 2023 @10:56AM (#35742056)
You probably need to rebase that for usage stats (install base)
Re:Microsoft is to enable Rust use for Windows 11 kernel by mustache_kimono on Friday April 28, 2023 @11:26AM (#35742398)
The CVEs / Install Base ratio is a pretty silly metric for determining the security of a product. A large number of CVEs could tell you that the users and developers of a particular product care a lot (or are paranoid or are simply security minded) about security, and want to give notice of issues to as many people as possible.

This is a live issue in the Rust community, which does appear to care a great deal about security, as to how to deal with minor/theoretical vulnerabilities perhaps unworthy of a CVE.

Re:Microsoft is to enable Rust use for Windows 11 kernel by amelius on Friday April 28, 2023 @11:44AM (#35742729)
> Disagree, macOS is way ahead.

Apple is a consumer electronics company. For serious tools, use Windows.

Re:Microsoft is to enable Rust use for Windows 11 kernel by r0l1 on Saturday April 29, 2023 @07:31AM (#35751963)
For serious privacy loss use Windows
Re:Microsoft is to enable Rust use for Windows 11 kernel by hardware2win on Friday April 28, 2023 @06:12AM (#35739440)
Project Midori was really good read, a lot of good stuff came from it

https://joeduffyblog.com/2015/11/03/blogging-about-midori/

Re:Microsoft is to enable Rust use for Windows 11 kernel by ape4 on Friday April 28, 2023 @08:12AM (#35740339)
Well Linux is using Rust in the kernel too.
Re:Microsoft is to enable Rust use for Windows 11 kernel by Narishma on Friday April 28, 2023 @08:51AM (#35740666)
Not yet.
Re:Microsoft is to enable Rust use for Windows 11 kernel by pjmlp on Friday April 28, 2023 @10:55AM (#35742035)
The forked Android version is using it already for the last two years.

Any Android 12 and later has a little bit of Rust taking care of the bluetooth communications driver.

Re:Microsoft is to enable Rust use for Windows 11 kernel by Narishma on Friday April 28, 2023 @12:53PM (#35743912)
Is that only the case in Android?
Re:Microsoft is to enable Rust use for Windows 11 kernel by pjmlp on Saturday April 29, 2023 @03:41AM (#35750915)
That was only the begining, followed by Keystore2, the new Ultra-wideband (UWB) stack, DNS-over-HTTP3, Android’s Virtualization framework (AVF) on Android 13.

https://security.googleblog.com/2022/12/memory-safe-language...

https://source.android.com/docs/setup/build/rust/building-ru...

Re:Microsoft is to enable Rust use for Windows 11 kernel by hgs3 on Friday April 28, 2023 @09:04AM (#35740803)
> Rust is a game changer in that it is built from the ground up to offer memory safety without garbage collection and still aims for zero overhead abstractions.

Safe Rust cannot represent circular data structures which makes entire classes of algorithms and architectures unimplementable. You have to workaround these limitations by creating auxiliary structures for tracking references or use reference counting; neither are "zero overhead abstractions." Rust is only zero overhead if all you do is pass values up and down the call stack. Its false appeal says more about the simplistic types of applications folks are writing than anything else.

Re:Microsoft is to enable Rust use for Windows 11 kernel by dralley on Friday April 28, 2023 @09:36AM (#35741116)
> Safe Rust cannot represent circular data structures which makes entire classes of algorithms and architectures unimplementable

In safe Rust. So just don't use safe Rust for those parts. Unsafe isn't evil, it's there for a reason. You should avoid it when possible and when there are no downsides, but sometimes they're are, and that's ok.

Re:Microsoft is to enable Rust use for Windows 11 kernel by jackmott42 on Friday April 28, 2023 @09:25AM (#35741023)
Often the workaround to graph representations that safe Rust can't do with the usual pointer approach is faster. You keep the data in an array, which improves your cache hit rate. Even C++ programmers will often use the same workaround either for safety or performance reasons.

As for overall performance in real programs, Rust seems to consistently do as well or better than C++ programs as the cases from Microsoft here show.

Re:Microsoft is to enable Rust use for Windows 11 kernel by yazaddaruvala on Friday April 28, 2023 @11:45AM (#35742756)
The font parsing code was ported to 100% safe rust (other than the C FFI), and was 10-15% faster to run than its Cpp predecessor.

Make of that what you will.

Re:Microsoft is to enable Rust use for Windows 11 kernel by lozenge on Friday April 28, 2023 @02:12PM (#35745031)
That's what they said. It aims for zero overhead abstractions.
Re:Microsoft is to enable Rust use for Windows 11 kernel by pkolaczk on Friday April 28, 2023 @04:07PM (#35746432)
> Safe Rust cannot represent circular data structures which makes entire classes of algorithms and architectures unimplementable.

That's not accurate. Safe Rust can represent circular data structures. It cannot represent circular data structures with 0 overhead. But you can use Rc/Arc/Weak + RefCell for that and it is not very hard. Or use one of crates that expose ways of building self-referential structures in a safe way (of course they do use unsafe underneath, but the API is safe) like ouroboros.

Re:Microsoft is to enable Rust use for Windows 11 kernel by timeon on Friday April 28, 2023 @02:50PM (#35745483)
> Microsoft has been interested in using memory safe languages in the kernel for some time now. An example is the Midori project led by Joe Duffy back in 2009 which explored the idea with a C# derivative.

There is also Project Verona.