Skip to content

Filename-keyed chart cache is poisonable and misses charts with unconventional .tgz names #384

Description

@jonasz-lasut

What happens

The chart cache at /tmp/charts is one flat directory shared by every Release, keyed by filename, with a bare os.Stat on hit and no content verification (pkg/clients/helm/client.go):

  • Any Release scheduled on the pod can seed a chart file (e.g. podinfo-6.10.0.tgz) that another Release then serves from cache - cross-source collisions and cache poisoning.
  • Charts served under an unconventional .tgz filename miss the cache entirely, because the lookup key is a reconstructed filename.

Proposed fix

Replace the filename-keyed cache with helm's content-addressed cache (downloader.ChartDownloader.DownloadToCache). Cache keys are the sha256 resolved from the requesting source (the OCI registry, or the repository index's advertised digest, verified before caching), so cross-source poisoning becomes structurally impossible and filename-based cache misses disappear.

Environment

provider-helm main (post helm-v4), helm.sh/helm/v4 v4.2.3.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions