|
| 1 | +# Sysbox User Guide: Security Vulnerabilities & CVEs |
| 2 | + |
| 3 | +This document describes security vulnerabilities / CVEs associated that may |
| 4 | +impact the security of Sysbox containers. |
| 5 | + |
| 6 | +These may be vulnerabilities in Sysbox itself (which are remediated fixed |
| 7 | +quickly) or in the Linux kernel features that Sysbox uses to isolate containers. |
| 8 | + |
| 9 | +## Summary |
| 10 | + |
| 11 | +| CVE | Date | Severity | Affects Sysbox | Details | |
| 12 | +| ------------ | -------- | -------- | -------------- | ------- | |
| 13 | +| 2022-0185 | 01/21/22 | High | Yes | [CVE 2022-0185 (User-Namespace Escape)](#cve-2022-0185-user-namespace-escape) | |
| 14 | +| 2022-0492 | 02/06/22 | Medium | No | [CVE 2022-0492 (Privilege Escalation via Cgroups v1)](#cve-2022-0492-privilege-escalation-via-cgroups-v1) | |
| 15 | +| 2022-0847 | 03/03/22 | High | Yes | [CVE-2022-0847 (Privilege Escalation via Pipes (aka Dirty Pipe))](#cve-2022-0847-privilege-escalation-via-pipes-aka-dirty-pipe) | |
| 16 | + |
| 17 | +The sections below describe each of these in more detail. |
| 18 | + |
| 19 | +## CVE 2022-0185 (User-Namespace Escape) |
| 20 | + |
| 21 | +**Date:** 01/21/22 |
| 22 | + |
| 23 | +**Severity:** High |
| 24 | + |
| 25 | +**Problem:** |
| 26 | + |
| 27 | +[CVE 2022-0185](https://ubuntu.com/security/CVE-2022-0185) is a vulnerability |
| 28 | +in the Linux kernel which permits a "User Namespace" escape (i.e., an |
| 29 | +unprivileged user inside a user-namespace may gain root access on the host). |
| 30 | + |
| 31 | +**Effect on Sysbox:** |
| 32 | + |
| 33 | +This vulnerability can negate the extra isolation of containers deployed with |
| 34 | +Sysbox as they always use the Linux user-namespace. |
| 35 | + |
| 36 | +**Fix:** |
| 37 | + |
| 38 | +The fix has been [committed][cve-2022-0185-commit] to the Linux kernel on |
| 39 | +01/18/22 and picked up by several distros shortly after. For Ubuntu, the fix has |
| 40 | +been released and requires a [kernel update](https://ubuntu.com/security/notices/USN-5240-1). |
| 41 | + |
| 42 | +We recommend you upgrade your kernel (i.e., check if your kernel distro carries |
| 43 | +the fix and if so, apply it). |
| 44 | + |
| 45 | +## CVE 2022-0492 (Privilege Escalation via Cgroups v1) |
| 46 | + |
| 47 | +**Date:** 02/06/22 |
| 48 | + |
| 49 | +**Severity:** Medium |
| 50 | + |
| 51 | +**Problem:** |
| 52 | + |
| 53 | +[CVE 2022-0492](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0492) is |
| 54 | +a flaw in the Linux kernel's cgroups mechanism that under some circumstances |
| 55 | +allows the use of the cgroups v1 release_agent feature to escalate privileges. |
| 56 | +It affects containers in some cases, as described in this [excellent article](https://unit42.paloaltonetworks.com/cve-2022-0492-cgroups/) |
| 57 | +by Unit 42 at Palo Alto Networks. |
| 58 | + |
| 59 | +**Effect on Sysbox:** |
| 60 | + |
| 61 | +Sysbox is NOT vulnerable to the security flaw exposed by this CVE. The reason is |
| 62 | +that inside a Sysbox container the cgroups v1 release_agent can't be written |
| 63 | +to (by virtue of Sysbox setting up the container with the Linux user-namespace). |
| 64 | +Even if you create privileged containers inside a Sysbox container, they won't |
| 65 | +be vulnerable due to the Sysbox container's usage of the Linux user-namespace. |
| 66 | + |
| 67 | +**Fix:** |
| 68 | + |
| 69 | +[CVE-2022-0492 is fixed][cve-2022-0492-commit] on the latest Linux release. |
| 70 | +Even though this CVE does not affect Sysbox containers, it does affect regular |
| 71 | +containers under some scenarios. Therefore we recommend that you check when your |
| 72 | +Linux distro picks up the fix and apply it. |
| 73 | + |
| 74 | +## CVE-2022-0847 (Privilege Escalation via Pipes (aka Dirty Pipe)) |
| 75 | + |
| 76 | +**Date:** 03/03/22 |
| 77 | + |
| 78 | +**Severity:** High |
| 79 | + |
| 80 | +**Problem:** |
| 81 | + |
| 82 | +A flaw in the Linux pipes mechanism allows privilege escalation. Even a process |
| 83 | +whose user-ID is "nobody" can elevate its privileges. |
| 84 | + |
| 85 | +**Effect on Sysbox:** |
| 86 | + |
| 87 | +This vulnerability affects containers deployed with Sysbox as it voids |
| 88 | +the protection provided by the Linux user-namespace (where processes |
| 89 | +in the container run as "nobody:nogroup" at host level). |
| 90 | + |
| 91 | +**Fix:** |
| 92 | + |
| 93 | +The vulnerability first appeared in Linux kernel version 5.8, which was released |
| 94 | +in 08/2020. The vulnerability was fixed on 02/21/22 via [this commit][cve-2022-0847-commit] |
| 95 | +and available in kernel versions 5.16.11, 5.15.25, and 5.10.102. |
| 96 | + |
| 97 | +We recommend you check when your Linux distro picks up the fix and apply it. |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +[cve-2022-0185-commit]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=722d94847de29310e8aa03fcbdb41fc92c521756 |
| 103 | +[cve-2022-0492-commit]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=24f6008564183aa120d07c03d9289519c2fe02af |
| 104 | +[cve-2022-0847-commit]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d2231c5d74e13b2a0546fee6737ee4446017903 |
| 105 | +[slack]: https://nestybox-support.slack.com/join/shared_invite/enQtOTA0NDQwMTkzMjg2LTAxNGJjYTU2ZmJkYTZjNDMwNmM4Y2YxNzZiZGJlZDM4OTc1NGUzZDFiNTM4NzM1ZTA2NDE3NzQ1ODg1YzhmNDQ#/ |
0 commit comments