GitHub Advisoryadvisory · Go
GHSA-f4p5-x4vc-mh4v Improper use of metav1.Duration allows for Denial of Service
MEDIUM
Official page ↗
- Aliases
- CVE-2022-39272
- Ecosystem
- Go
- Packages
- github.com/fluxcd/flux2, github.com/fluxcd/source-controller, github.com/fluxcd/kustomize-controller, github.com/fluxcd/helm-controller, github.com/fluxcd/notification-controller, github.com/fluxcd/image-automation-controller, github.com/fluxcd/image-reflector-controller, github.com/fluxcd/helm-controller/api, github.com/fluxcd/image-automation-controller/api, github.com/fluxcd/image-reflector-controller/api, github.com/fluxcd/kustomize-controller/api, github.com/fluxcd/notification-controller/api, github.com/fluxcd/source-controller/api
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L
- Weaknesses
- CWE-20
- Reviewed
- 2022-10-19
Affected packages
• Go github.com/fluxcd/flux2: >= 0.1.0, < 0.35.0 → fixed in 0.35.0
• Go github.com/fluxcd/source-controller: >= 0.0.1-alpha-1, < 0.30.0 → fixed in 0.30.0
• Go github.com/fluxcd/kustomize-controller: >= 0.0.1-alpha-1, < 0.29.0 → fixed in 0.29.0
• Go github.com/fluxcd/helm-controller: >= 0.0.1-alpha-1, < 0.24.0 → fixed in 0.24.0
• Go github.com/fluxcd/notification-controller: >= 0.0.1-alpha-1, < 0.27.0 → fixed in 0.27.0
• Go github.com/fluxcd/image-automation-controller: >= 0.1.0, < 0.26.0 → fixed in 0.26.0
• Go github.com/fluxcd/image-reflector-controller: >= 0.1.0, < 0.22.0 → fixed in 0.22.0
• Go github.com/fluxcd/helm-controller/api: < 0.26.0 → fixed in 0.26.0
• Go github.com/fluxcd/image-automation-controller/api: < 0.26.1 → fixed in 0.26.1
• Go github.com/fluxcd/image-reflector-controller/api: < 0.22.1 → fixed in 0.22.1
• Go github.com/fluxcd/kustomize-controller/api: < 0.30.0 → fixed in 0.30.0
• Go github.com/fluxcd/notification-controller/api: < 0.28.0 → fixed in 0.28.0
• Go github.com/fluxcd/source-controller/api: < 0.30.0 → fixed in 0.30.0
Description
Flux controllers within the affected versions range are vulnerable to a denial of service attack. Users that have permissions to change Flux’s objects, either through a Flux source or directly within a cluster, can provide invalid data to fields `.spec.interval` or `.spec.timeout` (and structured variations of these fields), causing the entire object type to stop being processed.
The issue has two root causes: a) the Kubernetes type `metav1.Duration` not being fully compatible with the Go type `time.Duration` as explained on upstream report; b) lack of validation within Flux to restrict allowed values.
Workarounds
Admission controllers can be employed to restrict the values that can be used for fields `.spec.interval` and `.spec.timeout`, however upgrading to the latest versions is still the recommended mitigation.
Credits
This issue was reported by Alexander Block (@codablock) through the Flux security mailing list (as recommended).
For more information
If you have any questions or comments about this advisory:
• Open an issue in any of the affected repositories.
• Contact us at the CNCF Flux channel.
References
• https://github.com/kubernetes/apimachinery/issues/131
Related
Alias · CVE (1)
- CVE-2022-39272 Flux is an open and extensible continuous delivery solution for Kubernetes. vulnerability
Weakness · CWE (1)
- CWE-20 Improper Input Validation weakness
References
- https://github.com/fluxcd/flux2/security/advisories/GHSA-f4p5-x4vc-mh4v web
- https://nvd.nist.gov/vuln/detail/CVE-2022-39272 advisory
- https://github.com/kubernetes/apimachinery/issues/131 web
- https://github.com/fluxcd/helm-controller/pull/533 web
- https://github.com/fluxcd/image-automation-controller/pull/439 web
- https://github.com/fluxcd/image-reflector-controller/pull/314 web
- https://github.com/fluxcd/kustomize-controller/pull/731 web
- https://github.com/fluxcd/notification-controller/pull/420 web
- https://github.com/fluxcd/source-controller/pull/903 web
- https://github.com/fluxcd/flux2 package
- https://github.com/kubernetes/apimachinery#131 web
- https://pkg.go.dev/vuln/GO-2022-1071 web