ghsa-f4p5-x4vc-mh4v
Vulnerability from github
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
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/flux2" }, "ranges": [ { "events": [ { "introduced": "0.1.0" }, { "fixed": "0.35.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/source-controller" }, "ranges": [ { "events": [ { "introduced": "0.0.1-alpha-1" }, { "fixed": "0.30.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/kustomize-controller" }, "ranges": [ { "events": [ { "introduced": "0.0.1-alpha-1" }, { "fixed": "0.29.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/helm-controller" }, "ranges": [ { "events": [ { "introduced": "0.0.1-alpha-1" }, { "fixed": "0.24.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/notification-controller" }, "ranges": [ { "events": [ { "introduced": "0.0.1-alpha-1" }, { "fixed": "0.27.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/image-automation-controller" }, "ranges": [ { "events": [ { "introduced": "0.1.0" }, { "fixed": "0.26.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/image-reflector-controller" }, "ranges": [ { "events": [ { "introduced": "0.1.0" }, { "fixed": "0.22.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/helm-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.26.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/image-automation-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.26.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/image-reflector-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.22.1" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/kustomize-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.30.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/notification-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.28.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/fluxcd/source-controller/api" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "0.30.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-39272" ], "database_specific": { "cwe_ids": [ "CWE-20" ], "github_reviewed": true, "github_reviewed_at": "2022-10-19T18:40:02Z", "nvd_published_at": "2022-10-22T00:15:00Z", "severity": "MODERATE" }, "details": "Flux controllers within the affected versions range are vulnerable to a denial of service attack. Users that have permissions to change Flux\u2019s 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.\n\nThe 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](https://github.com/kubernetes/apimachinery/issues/131); b) lack of validation within Flux to restrict allowed values.\n\n### Workarounds\n\nAdmission 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.\n\n### Credits\n\nThis issue was reported by Alexander Block (@codablock) through the Flux security mailing list (as [recommended](https://fluxcd.io/security/#report-a-vulnerability)).\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in any of the affected repositories.\n- Contact us at the CNCF Flux channel.\n\n### References\n\n- https://github.com/kubernetes/apimachinery/issues/131\n\n", "id": "GHSA-f4p5-x4vc-mh4v", "modified": "2024-05-20T21:35:10Z", "published": "2022-10-19T18:40:02Z", "references": [ { "type": "WEB", "url": "https://github.com/fluxcd/flux2/security/advisories/GHSA-f4p5-x4vc-mh4v" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-39272" }, { "type": "WEB", "url": "https://github.com/kubernetes/apimachinery/issues/131" }, { "type": "WEB", "url": "https://github.com/fluxcd/helm-controller/pull/533" }, { "type": "WEB", "url": "https://github.com/fluxcd/image-automation-controller/pull/439" }, { "type": "WEB", "url": "https://github.com/fluxcd/image-reflector-controller/pull/314" }, { "type": "WEB", "url": "https://github.com/fluxcd/kustomize-controller/pull/731" }, { "type": "WEB", "url": "https://github.com/fluxcd/notification-controller/pull/420" }, { "type": "WEB", "url": "https://github.com/fluxcd/source-controller/pull/903" }, { "type": "PACKAGE", "url": "https://github.com/fluxcd/flux2" }, { "type": "WEB", "url": "https://github.com/kubernetes/apimachinery#131" }, { "type": "WEB", "url": "https://pkg.go.dev/vuln/GO-2022-1071" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:L", "type": "CVSS_V3" } ], "summary": "Improper use of metav1.Duration allows for Denial of Service" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.