Edit: You may need to get a drink or use the toilet before reading this post as it is a tad longer than I expected.
Well I’ve finished my popcorn so thought I’d respond.
@HausMaus As others have said never base an opinion on a single source, especially when they are anonymous (and have 4 crypto links to send them money at the bottom of their main github page).
I’m not sure what you mean by sandboxing. You mentioned Windows 10 and it doesn’t really have sand-boxing natively, it has security layers. Windows 11 has sand-boxing called Application Isolation which is part of the reason you have a TPM but you also have Windows sandbox (only available or Pro/Ent/Edu additions) which is basically a Windows virtual machine on Windows. Linux has Flatpaks (Bubblewrap), Snaps as far as application sandboxing and a whole host of containerization options and VM software. I don’t know enough about MacOS/ChromeOS.
It is all about attack surface. The more points of entry, or code you have running, the greater the risk. As @joekamprad also pointed out, Linux is open source so it can and is regularly audited by individuals, commercial organisations and government bodies, as opposed to Windows which is closed source.
It is very hard to compare the actual lines of code required to run Linux compared to Windows as they work on two different models. A lot of the core functionality and drivers are part of the Linux kernel as opposed to Windows, as Windows uses external executables (.exe) and Dynamics Link Libraries (.dll) to achieve the same thing as well as 3rd party drivers. So despite the Linux kernel being ~40M lines of code and the Windows kernel being ~15M lines of code, you will probably find in reality the actual code to run a system would be similar. Plus you are opening yourself up to third party drivers under Windows which can be very big risk.
The other option you have under Linux is to compile the Kernel yourself and decide what you want, or don’t want in it. Under Windows it is very hard to disable certain features (some services just can’t be stopped or break other things) and if Microsoft wants to throw adverts at you, or scrape data from your machines, it is very hard to stop it. That is why there are ‘special’ versions of Windows for government bodies that Microsoft don’t offer to normal end-users, that disable a lot of the above. That also slightly leads to the question of what is a security risk? I personally don’t like the idea of Microsoft having access to my machine and any information they see fit.
Please don’t confuse memory safe programming languages with system security (this is a very big topic and I’d suggest you do more reading on what memory safe languages are). Obviously there has been a lot of talk about the Rust programming language, but first you need to understand a bit about the C/C++ programming language.
Very briefly; C is very fast as it is up to the programmer to allocate and deallocate memory used by the program as well as make sure there are no memory conflicts. The code is then compiled using a C compiler to opcode/machine code for the particular processor/platform to make a binary executable (.exe in Windows terms). Now programmers are human and make mistakes (I’m a commercial developer and I make quite a few, which is where testing comes in). Now if you forget to deallocate the memory after you’ve finished using it, not only will you have a memory leak but something else may end up reading it, or if you don’t allocate the correct amount of memory you could end up with an overflow, the program or operating system may crash or numerous other things. Also you may end up using part of the memory you’ve already allocated to something else that may lead to problems or another part of your program being able to read data it shouldn’t. These can lead to security problems but doesn’t mean they will.
Rust on the other hand is a memory safe language which will stop you (well try very very hard) from doing the above. That’s obviously a good thing, but ultimately it will still be compiled down to an executable program the same as C. Can you write memory unsafe code in Rust? Yes if you try really hard, or you don’t know what you’re doing. Can you write memory safe code in C? Yes we’ve been doing it for decades, or nothing would work, but it is very dependent on skill and can be difficult in very large code bases.
The above purely relates to memory safe programming languages, and there are obviously more than 2 programming languages and we never covered memory garbage collected languages such as Go (Golang as it is often referred as searching for Go on the Internet is very useful) which I use on a daily basis ), interpreted languages such as Phython and Javascript, or JIT (Just In Time) languages such as Java.
There are many more ways you can write software to have security vulnerabilities than just memory safety and it is just a small piece to a very large puzzle. You will also not see any major operating system completely re-written in a memory safe language for at least 5-10 years as it is a huge task.
In conclusion:
- “sandboxing on linux is either non-existent or weak enough that it may as well be non-existent” - You can sandbox pretty much anything to whatever level you want, and I never even mentioned the likes of AppArmor.
- "linux has near zero exploit mitigations compared to, “any other modern OS.” & Windows and Mac to, “Moving toward memory safe languages” - Very vague statement, what are we classing as exploit mitigation? I’ve dealt with a day 0 virus across several hundred Windows machines… On that day I was definitely thinking I was lucky to be using Windows. Also Randsomeware infected machines, because people love to hit that YES button, whatever the warning is. It is all about a compromise between usability and security, want a machine with no threats… disconnect your machine from the Internet and any networks… problem solved. Memory safety covered above - bit of a mute point.
- “the linux kernel itself is lacking in security. It claims there is a colossal amount of code all running within the most privileged areas of the operating system” - Erm… its the Kernel that’s what it is meant to have access to. Security layers are built on top of & around a Kernel. And her’s an example of why those pesky Windows DLLs can be dangerous -Windows 10 and 11 Security Measures Circumvented by DLL Hijacking Technique
Summary - IMHO the person you are quoting is either extremely lacking in knowledge, or has a extreme bias, or agenda.
“If I had more time, I would have written a shorter letter”