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.
What happens
The chart cache at
/tmp/chartsis one flat directory shared by every Release, keyed by filename, with a bareos.Staton hit and no content verification (pkg/clients/helm/client.go):podinfo-6.10.0.tgz) that another Release then serves from cache - cross-source collisions and cache poisoning..tgzfilename 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.