GHSA-6P8V-8CQ8-V2R3
Vulnerability from github – Published: 2022-05-24 21:14 – Updated: 2022-05-24 21:14Impact
Users with host file system access on a node and the privileges to run as group ID 1000 can gain access to the per node API of Cilium via Unix domain socket on the host where Cilium is running. If a malicious user is able to gain unprivileged access to a user corresponding to this group, then they can leverage this access to compromise the integrity as well as system availability on that host. Operating Systems that have unprivileged users not belonging the group ID 1000 are not affected by this vulnerability.
Best practices for managing the secure deployment of Kubernetes clusters will typically limit the ability for a malicious user to deploy pods with access to this group or to access the host filesystem, and limit user access to the nodes for users belonging to this group. These best practices include (but are not limited to) enforcing Admission Control policies to limit the configuration of Kubernetes Pod hostPath and SecurityContext fields.
Patches
Cilium versions >=1.9.16, >=1.10.11, >=1.11.5 mitigate this issue by setting the default group to 0 (root).
Workarounds
Prevent Cilium from running with group 1000 by modifying Cilium's DaemonSet to run with the following command:
containers:
- name: cilium-agent
args:
- -c
- "groupdel cilium && cilium-agent --config-dir=/tmp/cilium/config-map"
command:
- bash
instead of
containers:
- name: cilium-agent
args:
- --config-dir=/tmp/cilium/config-map
command:
- cilium-agent
Acknowledgements
The Cilium community has worked together with members of Isovalent and Form 3 to prepare these mitigations. Special thanks to Daniel Iziourov and Daniel Teixeira for their cooperation.
For more information
If you have any questions or comments about this advisory: * Email us at security@cilium.io
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/cilium/cilium"
},
"ranges": [
{
"events": [
{
"introduced": "1.11.0"
},
{
"fixed": "1.11.5"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/cilium/cilium"
},
"ranges": [
{
"events": [
{
"introduced": "1.10.0"
},
{
"fixed": "1.10.11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/cilium/cilium"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.16"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-29178"
],
"database_specific": {
"cwe_ids": [
"CWE-276"
],
"github_reviewed": true,
"github_reviewed_at": "2022-05-24T21:14:41Z",
"nvd_published_at": "2022-05-20T19:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\n\nUsers with host file system access on a node and the privileges to run as group ID 1000 can gain access to the per node API of Cilium via Unix domain socket on the host where Cilium is running. If a malicious user is able to gain unprivileged access to a user corresponding to this group, then they can leverage this access to compromise the integrity as well as system availability on that host. Operating Systems that have unprivileged users **not** belonging the group ID 1000 are **not** affected by this vulnerability.\n\nBest practices for managing the secure deployment of Kubernetes clusters will typically limit the ability for a malicious user to deploy pods with access to this group or to access the host filesystem, and limit user access to the nodes for users belonging to this group. These best practices include (but are not limited to) enforcing Admission Control policies to limit the configuration of Kubernetes Pod [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) and [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) fields.\n\n### Patches\n\nCilium versions \u003e=1.9.16, \u003e=1.10.11, \u003e=1.11.5 mitigate this issue by setting the default group to 0 (root).\n\n### Workarounds\n\nPrevent Cilium from running with group 1000 by modifying Cilium\u0027s DaemonSet to run with the following command:\n\n```yaml\n containers:\n - name: cilium-agent\n args:\n - -c\n - \"groupdel cilium \u0026\u0026 cilium-agent --config-dir=/tmp/cilium/config-map\"\n command:\n - bash\n```\ninstead of\n```yaml\n containers:\n - name: cilium-agent\n args:\n - --config-dir=/tmp/cilium/config-map\n command:\n - cilium-agent\n```\n\n### Acknowledgements\n\nThe Cilium community has worked together with members of Isovalent and Form 3 to prepare these mitigations. Special thanks to Daniel Iziourov and Daniel Teixeira for their cooperation.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@cilium.io](mailto:security@cilium.io)\n",
"id": "GHSA-6p8v-8cq8-v2r3",
"modified": "2022-05-24T21:14:41Z",
"published": "2022-05-24T21:14:41Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cilium/cilium/security/advisories/GHSA-6p8v-8cq8-v2r3"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29178"
},
{
"type": "WEB",
"url": "https://github.com/cilium/cilium/releases/tag/v1.10.11"
},
{
"type": "WEB",
"url": "https://github.com/cilium/cilium/releases/tag/v1.11.5"
},
{
"type": "WEB",
"url": "https://github.com/cilium/cilium/releases/tag/v1.9.16"
},
{
"type": "PACKAGE",
"url": "github.com/cilium/cilium"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Access to Unix domain socket can lead to privileges escalation in Cilium"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.