Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    D

    Dan Walsh

    danwalsh.livejournal.com · Personal blog · on HN since 2008

    Dan Walsh, a Red Hat security engineer, writes about SELinux: how it contains exploits, sandboxing, and labeling.

    Visit blogHN submissions
    SecurityOpen Source & Linux
    What HN says

    HN commenters cite his sandbox posts for running Firefox in an SELinux sandbox, and note SELinux policy-writing tools still need work.

    Stats for nerds
    24HN people shared it
    3linked in comments
    45story points
    Feb 2026last shared
    2009people per year2026

    Top posts on HN

    1. 1
      What does SELinux do to contain the the bash exploit?
      5 people · 44 points · first shared 2014 · 12 comments on HN
    2. 2
      Labeling of xen images with SELinux
      1 person · 1 points · first shared 2008 · Discussion on HN
    3. 3
      28545
      5 people · first shared 2009
    4. 4
      31146
      3 people · first shared 2010
    5. 5
      72697
      2 people · first shared 2015
    6. 6
      71489
      2 people · first shared 2015
    7. 7
      74642
      1 person · first shared 2017
    8. 8
      79191
      1 person · first shared 2020
    9. 9
      74642.html​
      1 person · first shared 2017
    10. 10
      Homepage
      1 person · first shared 2017

    What HN people wrote when they linked it

    • mmh0000Jan 2026

      Don't misunderstand my original post. SELinux is AMAZING. But, if SELinux in the default "targeted" policy is the thing that's protecting you, that's good, but it means there are some major bugs or misconfiguration higher up (i.e., in your web server).

      I assume you know what a network firewall is. Think of SELinux like a "System Call Firewall". SELinux will protect you from many so-called "zero-day" vulnerabilities. It watches every syscall an application makes, looks at its policy, and decides if that syscall should be allowed/denied. It is a good thing.

      However, SELinux is really not user-friendly, though it is extremely well documented and learnable. (run `man -k selinux` to see all the man pages) Red Hat also has thorough documentation (https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html-single/selinux_users_and_administrators_guide/index)

      Specifically, to your "weird permission issues". That is a "problem" with SELinux; it doesn't surface errors well. The TL;DR is: if you get a "permission denied" error, and you rule out the obvious (i.e., filesystem permissions), then you need to know to blame SELinux and look at the `/var/log/audit/audit.log` file.

      That file is technically human readable, but there are tools that make it much easier, such as `ausearch` and `sealert -a`.

      ---

      https://danwalsh.livejournal.com/71122.html

      "Now this is a horrible exploit but as you can see SELinux would probably have protected a lot/most of your valuable data on…

    • commandersakiSep 2024

      > Well that's nonsense. SELinux can protect against anything AppArmor can since AppArmor provides only a subset of features.

      This is from Dan Walsh who is quite famous in the SELinux community [1]. See the part "Why didn't SELinux block it?"

      Sure you can configure SELinux with a stricter policy, but virtually nobody does that in practice, they use the defaults, mostly because SELinux policies are really only used to fix stuff SELinux default policies break, usually using the audit2allow or whatever its called.

      > I sense you might not be interested in this since you've said you just want benchmarks

      If the EDR/antivirus industry can have various test suites and testing organisations, the same methodologies can apply to OS security subsystems. Let's see what happens with your default RH/SELinux, Ubuntu/Debian & AppArmor, and for shits and giggles OpenBSD, and see how they fare against exploits and vulnerabilities harvested over the years, and make reproducible labs. That's what I'm asking; I'm not going to scour security advisories to do tit for tat comparisons, I would rather see a well thought approach to this.

      We do this kind of comprehensive benchmarking with all sorts of software such as compression, cryptographic libraries, compilers / languages, etc. Traditionally this would've been harder in the days when virtualisation and utility computing was nascent, but the infrastructure part is pretty achievable these days. Just need to someone to expend the effort (and I'm…

    • ruthmarxSep 2024

      > Still don't care about the feature set, show me a useful benchmark.

      "I don't care to understand the differences in security thees systems provide"

      That's what you're saying here. Which means you're not going to be evaluating these systems in any way that matters.

      > If SELinux prevents a hypothetical that's great, but security is a tradeoff and I'd opt for convenience and simplicity to sacrifice potentially negligible risk.

      You're asking for benchmarks, but already here your willing to dismiss the results because you don't really care about them, you care about "convenience and simplicity" and security being good enough, right?

      In that case, sure AppArmor is good enough for most people.

      But so is a flimsy chain look. If you want to actually secure something and not just deter, you'd want a deadbolt and sturdy door, right?

      The point is, the feature sets matter, precisely because so many attacks are hypothetical. You have to see and speculate what attackers might do and have things in place to prevent that. SELinux facilitates that a lot more than AppArmor does.

      That's the fundamental point here, and not something you will likely find a nice graph to support. If you ask an AI to generate one for you it might be able to though. If you really still think you need it.

      > For example, I'm seeing that SELinux didn't mitigate ShellShock where AppArmor did (despite being an attack vector that isn't really common).

      Well that's nonsense. SELinux can protect against anything…

    • jfindleyFeb 2017

      Unfortunately, this is an area that could use some work. Tools for writing new policies are a long way away from what they could/should be. If you need something to work with SELinux that doesn't come with a policy you have essentially three options, in order of preference:

      1) Develop a new policy from scratch. This is fairly hard, and the tools, such as they are[0], are not great. There's a couple of good resources out there, including [1] which has some good examples, and Dan Walsh's blog [2].

      2) Use audit2allow to generate a policy semi-automatically. The resultant policy won't be very clean, and will almost certainly be more permissive than it needs to be, but if 1) is too much work (and I wouldn't blame you for this), then this is the next best thing.

      3) Run your binary in the unconfined domain (do something like chcon -t unconfined_exec_t /usr/local/bin/foo), but leave the rest of the system enforcing. This will mean your binary itself is able to do anything, but the rest of the system is still protected.

      Oh, and if you haven't read it before, you should definitely check out [3](pdf).

      0: http://oss.tresys.com/archive/slide.php
      1: https://github.com/TresysTechnology/refpolicy/blob/master/policy/modules/system/application.if
      2: http://danwalsh.livejournal.com/
      3: https://people.redhat.com/duffy/selinux/selinux-coloring-book_A4-Stapled.pdf

    • SEJeffMay 2016

      Funny, I've been running it on my laptop since Fedora 18 (current on 24 Beta). I might notice it maybe once every few months when a script or some software I'm futzing with tries to do something out of the ordinary:

      [jeff@omniscience ~]$ sestatus
      SELinux status: enabled
      SELinuxfs mount: /sys/fs/selinux
      SELinux root directory: /etc/selinux
      Loaded policy name: targeted
      Current mode: enforcing
      Mode from config file: enforcing
      Policy MLS status: enabled
      Policy deny_unknown status: allowed
      Max kernel policy version: 30

      And yes, my nick is a throwback to Security Enhanced Linux, but when the next exploit for some common library or software comes out and I'm not affected due to SELinux, I'll smile. Can you say the same?

      A few quick examples I pulled up:

      https://blog.namei.org/2008/01/08/selinux-mitigates-remote-root-vulnerability-in-openpegasus/

      http://danwalsh.livejournal.com/10131.html

      https://www.reddit.com/r/linux/comments/1xdokz/selinux_saved_our_asses_xpost_rselinux/

    • nickpsecurityFeb 2026

      It could be difficult. My first thought would be a SELinux policy like this article attempted:

      https://danwalsh.livejournal.com/28545.html

      One might have different profiles with different permissions. A network service usually wouldn't need your hone directory while a personal utility might not need networking.

      Also, that concept could be mixed with subprocess-style sandboxing. The two processes, main and sandboxed, might have different policies. The sandboxed one can only talk to main process over a specific channel. Nothing else. People usually also meter their CPU, RAM, etc.

      INTEGRITY RTOS had language-specific runtimes, esp Ada and Java, that ran directly on the microkernel. A POSIX app or Linux VM could run side by side with it. Then, some middleware for inter-process communication let them talk to each other.

    Related

    Project Atomicprojectatomic.io45 people

    Project Atomic: Deploy and Manage Your Docker Containers

    Project Atomic
    Company · last shared 2023
    Matthew Garrettmjg59.dreamwidth.org306 people

    I stayed in a hotel with Android lightswitches and it was as bad as you'd think

    Matthew Garrett
    Personal · last shared 2026
    GNOME Blogsblogs.gnome.org490 people

    AirPods fast connect security vulnerability

    GNOME Blogs
    Company · last shared 2026
    Brad Spenglergrsecurity.net/~spender16 people

    Grsecurity Developer Spender's Feelings on the State of Linux Security

    Brad Spengler
    Personal · last shared 2023
    Joanna Rutkowskatheinvisiblethings.blogspot.com91 people

    The Linux Security Circus: On GUI isolation

    Joanna Rutkowska
    Personal · last shared 2026
    Red Hat Security Blogsecurityblog.redhat.com26 people

    Samba remote execution vulnerability (CVE-2015-0240)

    Red Hat Security Blog
    Company · last shared 2016
    I Don't Play Dartsidontplaydarts.com81 people

    Detecting the use of "curl | bash" server-side

    I Don't Play Darts
    Personal · last shared 2024
    Evan Klitzkeeklitzke.org47 people

    The cult of dd (2017)

    Evan Klitzke
    Personal · last shared 2024