Live data from Hacker News

New Linux vulnerability affecting cgroups: can containers escape?

unit42.paloaltonetworks.com

81–86 of 86 posts

Re: New Linux vulnerability affecting cgroups: can containers escape?

#81
post #2

Important note on this: "Fortunately, the default security hardenings in most container environments are enough to prevent container escape. Containers running with AppArmor or SELinux are protected. " So, all that hard work on SELinux continues to pay off.

Sadly, many answers to questions related to selinux issues, or howto's start with: Disable selinux.

Which is an excellent indicator that the following advice is bad.

Re: New Linux vulnerability affecting cgroups: can containers escape?

#82
post #78

Earlier quoted context omitted.

That's fantastic for Fedora desktop users. I don't expect you'd know, but is there a way to get the same quality of information via a CLI command?

grep denied /var/log/audit/* On some systems the avc violations also get printed in dmesg. If violations block your whole system from even running, you can enable permissive mode, this only logs violations without enforcing them. As others already mentioned, turning violation logs into allow rules can be done with audit2allow. Wouldn’t recommend blindly using that though as the generated rules are always either too n…

FYI, "ausearch -i -ts recent -m avc" gives you SELinux violations from the last 10 minutes in slightly more readable form.

Re: New Linux vulnerability affecting cgroups: can containers escape?

#83
post #6

Back in the day, people insisted that containers were not security boundaries and should not be treated as such. They're meant to contain things from going off the rails unintentionally, but an actual threat was another story. However, realistically, given the env that a container gives you, it certainly looks and feels like a security boundary. So are we just going to be stuck in this retroactive security cleanup mo…

How are they not a security boundary? Nearly everything is a security boundary using defense in depth no?

Security boundaries in Linux are UIDs/GIDs, capabilities, SELinux domains, and others. These can be applied to processes regardless of whether the process runs in a container.

i.e. root inside a container is root on the host; the container itself doesn't help that. But other security features, that are applied to the processes within the container when the container is created, might.

Re: New Linux vulnerability affecting cgroups: can containers escape?

#84

Earlier quoted context omitted.

Does it support docker-compose?

Yes, there is a podman-compose package as well.

Actually, it supports docker-compose proper (v1 and v2, even if there are some bugs for v2)

Re: New Linux vulnerability affecting cgroups: can containers escape?

#85
The article is maddening in its generic “update to the latest kernel” advice and not listing the specific kernel versions fixed. They are:

- Stable: 5.16.6

- LTS (for Alpine Linux): 5.15.20

Alpine 3.15 main is currently at 5.15.16 and thus vulnerable.

Re: New Linux vulnerability affecting cgroups: can containers escape?

#86

Earlier quoted context omitted.

Fedora literally gives you a notification and you can take action (Me a as novice Linux user)

That's fantastic for Fedora desktop users. I don't expect you'd know, but is there a way to get the same quality of information via a CLI command?

I think there is, I's been a long time since I had issues with SELinux. To be honest I have no idea how the GUI works. I do everything with CLI.

From the top of my head, I don't know. But this might help:

https://wiki.archlinux.org/title/SELinux

Post reply on HN