Advisory

GHSA-f4p5-x4vc-mh4v

Also known as: BIT-flux-2022-39272, BIT-kustomize-2022-39272, CVE-2022-39272, GO-2022-1071

Summary

Improper use of metav1.Duration allows for Denial of Service

Details

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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-10-19 18:40 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

13 affected packages; all Go · All systems
PackageAffectedFix
github.com/fluxcd/flux2introduced 0.1.0, fixed 0.35.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/source-controllerintroduced 0.0.1-alpha-1, fixed 0.30.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/kustomize-controllerintroduced 0.0.1-alpha-1, fixed 0.29.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/helm-controllerintroduced 0.0.1-alpha-1, fixed 0.24.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/notification-controllerintroduced 0.0.1-alpha-1, fixed 0.27.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/image-automation-controllerintroduced 0.1.0, fixed 0.26.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/image-reflector-controllerintroduced 0.1.0, fixed 0.22.0go get github.com/fluxcd/[email protected]
github.com/fluxcd/helm-controller/apiEarlier versionsgo get github.com/fluxcd/helm-controller/[email protected]
github.com/fluxcd/image-automation-controller/apiEarlier versionsgo get github.com/fluxcd/image-automation-controller/[email protected]
github.com/fluxcd/image-reflector-controller/apiEarlier versionsgo get github.com/fluxcd/image-reflector-controller/[email protected]
github.com/fluxcd/kustomize-controller/apiEarlier versionsgo get github.com/fluxcd/kustomize-controller/[email protected]
github.com/fluxcd/notification-controller/apiEarlier versionsgo get github.com/fluxcd/notification-controller/[email protected]
github.com/fluxcd/source-controller/apiEarlier versionsgo get github.com/fluxcd/source-controller/[email protected]

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

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences