Serious Discussion Linux Security. What is done / can be done about Madaidan's criticisms.

Victor M

Level 27
Thread author
Verified
Top Poster
Well-known
Oct 3, 2022
1,675
6,428
2,569
First of all let me link you to Madaidan's famous Linux Security criticism piece: Linux | Madaidan's Insecurities .

First, I disagree with the introduction to Sandboxing section. SELlinux is built on the containment idea, almost the same idea as Sandboxing. And it has staff_u for admins and user_u for ordinary users. And it partitions those 2 pretty well. The user_u can never sudo to gain root, stops arbitrarily marked SUID programs and cannot administer the system.

The arguments for flatpak and firejail I agree with. In Madaidan's flatpak section, it says sandboxing features are arbitrarily enforced by developers, and that is true. Some are more lax than others. And there should be a fixed implementation. In the firejail section, it notes that firejail is a SUID root program and any vulnerabilities would give the attacker root. And it apparently has happened before.

Madaidan chose 2 good examples but neglected to look at SELinux.

No comment on the 2nd Exploit Mitigation section. As I am no expert in exploits.

No comment on 3rd section on Kernel as I am no expert on kernels.

Section 4 deals with privilege escalation to Root. An account that has access to sudo is as good as gaining root because sudo passwords can be obtained easily via keylogging. Well, thats why there are standard accounts. Standard accounts has no access to sudo. And SELinux makes double sure of that. (note: Red Hat and variants like Fedora, CentOS and Rocky has SELinux) And to overcome keylogging, you get a $27 Yubikey which is a hardware 2FA token; you touch it in addition to providing the password to grant access . Or you have a fingerprint reader on your laptop. Keylogging is also made very difficult now with the now popular Wayland XWindows replacement of X11 XWindows. One window can no longer touch or listen to another.

Section 5 explains more on keylogging.

Section 6 talks about distro specific issues. In particular the article criticizes the 'stable' release model where CVE patches are not backpoprted consistently. And that some developers don't bother to file CVE's so Ubuntu etc don't know which package to backport. It gives Ubuntu and Debian as examples. And it admits that 'rolling' release models now counter that. There are distro's which are 'aggressive' in their releases, like Fedora (updates arrive almost every day) Rollng release big distro's include Arch, openSuse, Gentoo, maybe more.

Section 7 dismisses hardening as a solution and dismisses SELinux as an incomplete MAC solution because majority of apps runs as unconfined_u. And the article mistakenly assumes that we users want to maintain compatibility with the entire Linux ecosystem. Firstly, unconfined_u is just the label give to 'the rest of the system'. All important components already have strict MAC rules written for them. You only have to only list all the rules to see this. SELinux is mature. While hardening may not directly address kernel issues. A good part of hardening is reduction of attack surface. And the less you have running, the less exploitation can find a vector to succeed. Hardening may also involve direct mitigation of known weaknesses. For example, one masks the cups service until it is needed. Hardening may also mean introduction of an network IPS like Suricata that stops a whole slop of attacks.

The article tries too hard to counter the versatility of Linux to make it's point. People DO choose distro's that have strong security. And people DO perform hardening, it is part of a solution. There are always compensating security controls. Faulting Linux is too broad of a stroke.
 
Last edited:
There have been many advances from 2022 to the present.
It would be interesting to compare this with updated data on sandboxes.

Some AI models estimate that the default sandbox in Chromium-based browsers on a Windows OS is 10–15% more secure than the same browser on a Linux distribution.

@Bot
Do you agree with that estimate?
 
There have been many advances from 2022 to the present.
It would be interesting to compare this with updated data on sandboxes.

Some AI models estimate that the default sandbox in Chromium-based browsers on a Windows OS is 10–15% more secure than the same browser on a Linux distribution.

@Bot
Do you agree with that estimate?
Short answer

No. I would not treat the “10–15% more secure” estimate as meaningful without a defined methodology and reproducible test data. Security of browser sandboxes is not normally measurable as a single percentage, and I am not aware of reliable evidence supporting that specific figure.

Why the comparison is difficult

A Chromium browser uses several layers on both platforms, including:

  • A sandboxed renderer architecture
  • Process and privilege separation
  • System-call or API restrictions
  • Exploit mitigations
  • Site isolation and origin isolation
  • GPU, utility, network, and other specialized processes

The actual protection depends on more than the operating-system name:

  • Windows version and security configuration
  • Linux distribution, kernel version, and sandbox implementation
  • Whether user namespaces are available
  • The Chromium build and launch options
  • Hardware-backed protections and virtualization features
  • SELinux, AppArmor, or other mandatory access-control policy
  • The particular vulnerability and exploit chain being considered

A browser sandbox is also not the same thing as an entire operating-system security boundary. A renderer escape, a kernel exploit, a vulnerable privileged helper, or access to sensitive user data can affect the result differently on each platform.

Windows compared with Linux

Windows Chromium builds commonly rely on Windows-specific mechanisms such as restricted tokens, job objects, integrity levels, mitigation policies, and related process restrictions. Linux builds use mechanisms such as namespaces, seccomp-bpf, Linux capabilities, and, depending on the distribution and configuration, additional LSM controls such as SELinux or AppArmor.

Neither list automatically proves that one platform is 10–15% safer. Each platform has different attack surfaces and different strengths. Windows may provide a more uniform baseline across installations, while Linux can offer strong additional confinement when the kernel, browser sandbox, and MAC policy are correctly configured. Conversely, Linux configurations vary considerably, and some distributions or installations may lack protections that are available elsewhere.

SELinux can provide valuable defense in depth, but its presence alone does not establish that a Chromium process is equivalently or more strongly confined than on Windows. The relevant question is the effective policy applied to the browser and its child processes, not merely whether SELinux is enabled. An unconfined browser process may receive little useful additional protection from SELinux.

How such a claim should be tested

A defensible comparison would need to specify:

  • The exact Windows and Linux versions
  • The exact Chromium version and build configuration
  • Default settings versus hardened settings
  • The browser processes and privileges being compared
  • The escape techniques and vulnerabilities included in the test
  • Whether the test measures renderer escapes, OS compromise, data access, or all of these
  • The number and quality of independent test cases
  • How false positives, failed exploits, and unknown vulnerabilities are handled

Even then, the result would probably be expressed as comparative exploit resistance under a particular threat model, not as a universal security percentage.

Practical conclusion

The estimate should be regarded as unsupported unless its authors provide a transparent methodology, source data, and reproducible results. It is reasonable to say that Windows and Linux provide different browser-sandbox environments, and that one may perform better against a particular exploit class. It is not reasonable to generalize that difference into a universal 10–15% advantage.

For practical protection, keep the browser and operating system fully updated, retain the browser’s sandbox and site-isolation features, avoid disabling security mitigations for compatibility, and use a well-maintained Linux distribution with current kernel and MAC-policy updates when Linux is selected.
 
  • Thanks
Reactions: Sampei.Nihira
First of all let me link you to Madaidan's famous Linux Security criticism piece: Linux | Madaidan's Insecurities .

First, I disagree with the introduction to Sandboxing section. SELlinux is built on the containment idea, almost the same idea as Sandboxing. And it has staff_u for admins and user_u for ordinary users. And it partitions those 2 pretty well. The user_u can never sudo to gain root, stops arbitrarily marked SUID programs and cannot administer the system.

The arguments for flatpak and firejail I agree with. In Madaidan's flatpak section, it says sandboxing features are arbitrarily enforced by developers, and that is true. Some are more lax than others. And there should be a fixed implementation. In the firejail section, it notes that firejail is a SUID root program and any vulnerabilities would give the attacker root. And it apparently has happened before.

Madaidan chose 2 good examples but neglected to look at SELinux.

No comment on the 2nd Exploit Mitigation section. As I am no expert in exploits.

No comment on 3rd section on Kernel as I am no expert on kernels.

Section 4 deals with privilege escalation to Root. An account that has access to sudo is as good as gaining root because sudo passwords can be obtained easily via keylogging. Well, thats why there are standard accounts. Standard accounts has no access to sudo. And SELinux makes double sure of that. (note: Red Hat and variants like Fedora, CentOS and Rocky has SELinux) And to overcome keylogging, you get a $27 Yubikey which is a hardware 2FA token; you touch it in addition to providing the password to grant access . Or you have a fingerprint reader on your laptop. Keylogging is also made very difficult now with the now popular Wayland XWindows replacement of X11 XWindows. One window can no longer touch or listen to another.

Section 5 explains more on keylogging.

Section 6 talks about distro specific issues. In particular the article criticizes the 'stable' release model where CVE patches are not backpoprted consistently. And that some developers don't bother to file CVE's so Ubuntu etc don't know which package to backport. It gives Ubuntu and Debian as examples. And it admits that 'rolling' release models now counter that. There are distro's which are 'aggressive' in their releases, like Fedora (updates arrive almost every day) Rollng release big distro's include Arch, openSuse, Gentoo, maybe more.

Section 7 dismisses hardening as a solution and dismisses SELinux as an incomplete MAC solution because majority of apps runs as unconfined_u. And the article mistakenly assumes that we users want to maintain compatibility with the entire Linux ecosystem. Firstly, unconfined_u is just the label give to 'the rest of the system'. All important components already have strict MAC rules written for them. You only have to only list all the rules to see this. SELinux is mature. While hardening may not directly address kernel issues. A good part of hardening is reduction of attack surface. And the less you have running, the less exploitation can find a vector to succeed. Hardening may also involve direct mitigation of known weaknesses. For example, one masks the cups service until it is needed. Hardening may also mean introduction of an network IPS like Suricata that stops a whole slop of attacks.

The article tries too hard to counter the versatility of Linux to make it's point. People DO choose distro's that have strong security. And people DO perform hardening, it is part of a solution. There are always compensating security controls. Faulting Linux is too broad of a stroke.
But this article is almost 5 years old. A lot has changed.
 
Last edited: