github.com/clastix/kamaji
Affected
- introduced
0, last affected1.0.0(semver)
Fixed versions
None listed
Fix
No fixed version is listed.
Advisory
Also known as: CVE-2024-42480, GO-2024-3063
RBAC Roles for etcd created by Kamaji are not disjunct
Summary
_Using an "open at the top" range definition in RBAC for etcd roles leads to some TCPs API servers being able to read, write and delete the data of other control planes._
Details
The problematic code is this: https://github.com/clastix/kamaji/blob/8cdc6191242f80d120c46b166e2102d27568225a/internal/datastore/etcd.go#L19-L24
The range created by this RBAC setup code looks like this:
etcdctl role get example
Role example
KV Read:
[/example/, \0)
KV Write:
[/example/, \0)
The range end \0 means "everything that comes after" in etcd, so potentially all the key prefixes of controlplanes with a name that comes after "example" when sorting lexically (e.g. example1, examplf, all the way to zzzzzzz if you will).
PoC
--etcd-prefix flag value to point to the other TCP datastore keykubectl and will notice you're reading and writing data of another TenantImpact
Full control over other TCPs data, if you are able to obtain the name of other TCPs that use the same datastore and are able to obtain the user certificates used by your control plane (or you are able to configure the kube-apiserver Deployment, as shown in the PoC).
Critical Basis: The source's own band: CRITICAL
0, last affected 1.0.0 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0