-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE-2022-24348 fix broke Helm downloader plugins interface #8397
Comments
Hi, the fix breaks the downloader plugin feature in at all. Consider to allow to configure the allowedHelmRemoteProtocols propterty, e.g. through argocd-cm |
Be aware that allowing custom schemes in I think that a very prominent warning should be placed in doc and other places. Another solution may be somehow chrooting the execution (this will eradicate the issue once for all), but I don't know if it's feasible to do safely inside containers. |
Thats abolute correct. Someone needs to be faked the file protocol and the issue appears again. While the standard installation might be safe for now, custom schemes needs to implements first by an administrator (by installing the plugin inside the container)
This is a good catch. I will add a switch here to disable following symlinks, Since the plugin doesn't know the boundaries, I can only deny symlinks by default. |
A more general solution for path traversal vulnerabilities in ArgoCD (and this issue) might be $ proot -b /dev -b /proc -b /sys -b /lib -b /bin -b /lib64 -b /usr -b "$(pwd):/src" -r ~/testproot/ -w /src `which ls` / -la
total 152
drwxr-xr-x 11 1000 1000 4096 feb 6 13:50 .
drwxr-xr-x 11 1000 1000 4096 feb 6 13:50 ..
drwxr-xr-x 2 0 0 114688 feb 6 13:42 bin
drwxr-xr-x 20 0 0 4080 feb 4 15:53 dev
drwxr-xr-x 3 1000 1000 4096 feb 6 13:49 home
drwxr-xr-x 165 0 0 12288 gen 30 21:37 lib
drwxr-xr-x 3 0 0 4096 dic 26 2019 lib64
dr-xr-xr-x 418 0 0 0 nov 10 18:21 proc
drwxr-xr-x 4 1000 1000 4096 feb 6 12:48 src
dr-xr-xr-x 13 0 0 0 nov 12 22:10 sys
drwxr-xr-x 15 0 0 4096 dic 28 18:36 usr
$ proot -b /dev -b /proc -b /sys -b /lib -b /bin -b /lib64 -b /usr -b "$(pwd):/src" -r ~/testproot/ -w /src `which ls` /src -la
total 32
drwxr-xr-x 4 1000 1000 4096 feb 6 12:48 .
drwxr-xr-x 11 1000 1000 4096 feb 6 13:50 ..
drwxr-xr-x 2 1000 1000 4096 dic 20 07:07 charts
-rw-r--r-- 1 1000 1000 1146 dic 20 07:08 Chart.yaml
-rw-r--r-- 1 1000 1000 349 dic 20 07:07 .helmignore
-rw-r--r-- 1 1000 1000 3622 feb 6 12:48 secrets.yaml
drwxr-xr-x 2 1000 1000 4096 gen 25 17:18 templates
-rw-r--r-- 1 1000 1000 23 feb 6 09:39 values.yaml Apparently, I was able to run proot -b /dev -b /proc -b /sys -b "/usr/lib:/lib" -b "/usr/lib64:/lib64" -b "/usr/lib32:/lib32" -b /usr -b ~/test/ -r /tmp/proot -w ~/test/ /usr/local/bin/helm template test . Note that I'll try to do a full PoC if you (maintainer) think that it's a potential solution :-) |
Restrict the directory with something like proot increase the complexity in general. Who knows, if ptrace is allowed by AppArmor/SELinux. This issue that other build directory can access, exists in Jenkins, Gitlab and other CI systems, too. To separate build directories and denied the access from each other, separate or non peristent runner/agents would archive this. Something like multiple repo-server which can be bound to Applications and restricted by Projects) can a long termin solution. Restriction the helm call to the helm call may introduce a lot of incompabilties. I would strongly recommend to move the dicussion "What the best way to solve this long term" into a GitHub discussion. As short-term goal to fix this issue, I a conguration for |
Can we update the argocd version directly to 2.2.4 from 2.0.0 to overcome this https://nvd.nist.gov/vuln/detail/CVE-2022-24348 |
Hello, Any news with this issue ? SInce i updated argocd, i cant use helm secrets anymore which is very problematic. Is there any workaround ? |
@stephaneetje none for now aside downgrading to the vulnerable version.. |
Working on fixing it. Once the fix is ready will cherry-pick it into 2.3, 2.2 and 2.1. Please check vulnerability limitations in https://medium.com/argo-project/argo-cd-deals-with-our-first-zero-day-cve-86e8fb158e8f . The vulnerability is there but it is not applicable to every organization. |
There is no invulnerable version, yet. If you take a look at this chart, you are still able to access files from everywhere. |
@alexmt Hi, is there a chance to backport this into the 2.2.x branch? In case if not, is there any release of ArgoCD 2.3 planned? |
@alexmt Hey here, we need helm-secrets feature, is any chance to support it on 2.3.x ? |
Hi @alexmt , it is already document on my side and users confirmed it works. |
@jkroepke Yes, confirmed - it works. I'd marked clearly in documentation:
|
@petr4 Feel free to send a PR https://github.com/jkroepke/helm-secrets/blob/main/docs/ArgoCD%20Integration.md I'm happy to see KMS examples aside the existing GCP one. |
Checklist:
argocd version
.Describe the bug
The fix for
CVE-2022-24348
introduced a check for helm remote protocols (seeallowedHelmRemoteProtocols
,isURLSchemeAllowed
and others in 78c2084 ). This check brokehelm secrets
integration with ArgoCD ashelm secrets
is using URL schemas likesecrets+age-import://
invalueFiles
to indicate the tool to use (age
,gpg
, etc).See jkroepke/helm-secrets#185
To Reproduce
Create an Application like:
A detailed example is here: https://github.com/jkroepke/helm-secrets/wiki/ArgoCD-Integration
Expected behavior
To keep using
helm secrets
.Version
Logs
The error in ArgoCD is :
rpc error: code = Unknown desc = Manifest generation error (cached): the URL scheme 'secrets+age-import' is not allowed
The text was updated successfully, but these errors were encountered: