diff --git a/cmd/argocd/commands/admin/app.go b/cmd/argocd/commands/admin/app.go index a4f4557858a22..fbceb436f8609 100644 --- a/cmd/argocd/commands/admin/app.go +++ b/cmd/argocd/commands/admin/app.go @@ -45,16 +45,6 @@ func NewAppCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command { var command = &cobra.Command{ Use: "app", Short: "Manage applications configuration", - Example: ` -# Compare results of two reconciliations and print diff -argocd admin app diff-reconcile-results APPNAME [flags] - -# Generate declarative config for an application -argocd admin app generate-spec APPNAME - -# Reconcile all applications and store reconciliation summary in the specified file -argocd admin app get-reconcile-results APPNAME -`, Run: func(c *cobra.Command, args []string) { c.HelpFunc()(c, args) }, diff --git a/cmd/argocd/commands/admin/cluster.go b/cmd/argocd/commands/admin/cluster.go index a72aaebc201a0..ef83746e5204c 100644 --- a/cmd/argocd/commands/admin/cluster.go +++ b/cmd/argocd/commands/admin/cluster.go @@ -44,6 +44,15 @@ func NewClusterCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clientc var command = &cobra.Command{ Use: "cluster", Short: "Manage clusters configuration", + Example: ` +# Authenticate with a Token +argocd admin cluster --auth-token YOUR_AUTH_TOKEN + +# Use a Custom Client Certificate and Key +argocd admin cluster --client-crt /path/to/client.crt --client-crt-key /path/to/client.key + +# Set Logging Format and Level +argocd admin cluster --logformat json --loglevel debug`, Run: func(c *cobra.Command, args []string) { c.HelpFunc()(c, args) }, @@ -448,6 +457,21 @@ func NewClusterStatsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma var command = cobra.Command{ Use: "stats", Short: "Prints information cluster statistics and inferred shard number", + Example: ` +#Display Cluster Statistics for the Default Cluster +argocd admin cluster stats + +#Display Cluster Statistics for a Specific Cluster Context +argocd admin cluster stats --context=my-cluster-context + +#Display Cluster Statistics for a Cluster with Custom Configuration (Kubeconfig Path) +argocd admin cluster stats --kubeconfig=/path/to/custom/kubeconfig.yaml + +#Display Cluster Statistics with a Custom Request Timeout +argocd admin cluster stats --request-timeout=5s + +#Display Cluster Statistics for a Specific Shard +argocd admin cluster stats --shard=1`, Run: func(cmd *cobra.Command, args []string) { ctx := cmd.Context() @@ -492,6 +516,18 @@ func NewClusterConfig() *cobra.Command { Use: "kubeconfig CLUSTER_URL OUTPUT_PATH", Short: "Generates kubeconfig for the specified cluster", DisableAutoGenTag: true, + Example: ` +#Generate a Kubeconfig for a Cluster and Save it to a File +argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml + +#Generate a Kubeconfig with a Custom Cluster Name: +argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --cluster=my-cluster + +#Generate a Kubeconfig for a Cluster with TLS Verification Disabled +argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --insecure-skip-tls-verify + +#Generate a Kubeconfig with a Custom Namespace Scope +argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml -n my-namespace`, Run: func(c *cobra.Command, args []string) { ctx := c.Context() diff --git a/cmd/argocd/commands/app_resources.go b/cmd/argocd/commands/app_resources.go index 4cffb706ff1bc..e48465c7e4693 100644 --- a/cmd/argocd/commands/app_resources.go +++ b/cmd/argocd/commands/app_resources.go @@ -3,7 +3,6 @@ package commands import ( "fmt" "os" - "text/tabwriter" "github.com/argoproj/argo-cd/v2/cmd/util" "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" @@ -19,6 +18,8 @@ import ( "github.com/argoproj/argo-cd/v2/util/argo" "github.com/argoproj/argo-cd/v2/util/errors" argoio "github.com/argoproj/argo-cd/v2/util/io" + + "text/tabwriter" ) func NewApplicationPatchResourceCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command { @@ -29,7 +30,6 @@ func NewApplicationPatchResourceCommand(clientOpts *argocdclient.ClientOptions) var kind string var group string var all bool - var project string command := &cobra.Command{ Use: "patch-resource APPNAME", Short: "Patch resource in an application", @@ -46,7 +46,6 @@ func NewApplicationPatchResourceCommand(clientOpts *argocdclient.ClientOptions) command.Flags().StringVar(&group, "group", "", "Group") command.Flags().StringVar(&namespace, "namespace", "", "Namespace") command.Flags().BoolVar(&all, "all", false, "Indicates whether to patch multiple matching of resources") - command.Flags().StringVar(&project, "project", "", `The name of the application's project - specifying this allows the command to report "not found" instead of "permission denied" if the app does not exist`) command.Run = func(c *cobra.Command, args []string) { ctx := c.Context() @@ -78,7 +77,6 @@ func NewApplicationPatchResourceCommand(clientOpts *argocdclient.ClientOptions) Kind: pointer.String(gvk.Kind), Patch: pointer.String(patch), PatchType: pointer.String(patchType), - Project: pointer.String(project), }) errors.CheckError(err) log.Infof("Resource '%s' patched", obj.GetName()) @@ -96,7 +94,6 @@ func NewApplicationDeleteResourceCommand(clientOpts *argocdclient.ClientOptions) var force bool var orphan bool var all bool - var project string command := &cobra.Command{ Use: "delete-resource APPNAME", Short: "Delete resource in an application", @@ -111,7 +108,6 @@ func NewApplicationDeleteResourceCommand(clientOpts *argocdclient.ClientOptions) command.Flags().BoolVar(&force, "force", false, "Indicates whether to orphan the dependents of the deleted resource") command.Flags().BoolVar(&orphan, "orphan", false, "Indicates whether to force delete the resource") command.Flags().BoolVar(&all, "all", false, "Indicates whether to patch multiple matching of resources") - command.Flags().StringVar(&project, "project", "", `The name of the application's project - specifying this allows the command to report "not found" instead of "permission denied" if the app does not exist`) command.Run = func(c *cobra.Command, args []string) { ctx := c.Context() @@ -143,7 +139,6 @@ func NewApplicationDeleteResourceCommand(clientOpts *argocdclient.ClientOptions) Kind: pointer.String(gvk.Kind), Force: &force, Orphan: &orphan, - Project: pointer.String(project), }) errors.CheckError(err) log.Infof("Resource '%s' deleted", obj.GetName()) @@ -255,7 +250,6 @@ func printResources(listAll bool, orphaned bool, appResourceTree *v1alpha1.Appli func NewApplicationListResourcesCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command { var orphaned bool var output string - var project string var command = &cobra.Command{ Use: "resources APPNAME", Short: "List resource of application", @@ -272,7 +266,6 @@ func NewApplicationListResourcesCommand(clientOpts *argocdclient.ClientOptions) appResourceTree, err := appIf.ResourceTree(ctx, &applicationpkg.ResourcesQuery{ ApplicationName: &appName, AppNamespace: &appNs, - Project: &project, }) errors.CheckError(err) printResources(listAll, orphaned, appResourceTree, output) @@ -280,6 +273,5 @@ func NewApplicationListResourcesCommand(clientOpts *argocdclient.ClientOptions) } command.Flags().BoolVar(&orphaned, "orphaned", false, "Lists only orphaned resources") command.Flags().StringVar(&output, "output", "", "Provides the tree view of the resources") - command.Flags().StringVar(&project, "project", "", `The name of the application's project - specifying this allows the command to report "not found" instead of "permission denied" if the app does not exist`) return command } diff --git a/cmd/argocd/commands/projectwindows.go b/cmd/argocd/commands/projectwindows.go index a46f9ece64c36..52b087d09f965 100644 --- a/cmd/argocd/commands/projectwindows.go +++ b/cmd/argocd/commands/projectwindows.go @@ -22,6 +22,22 @@ func NewProjectWindowsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com roleCommand := &cobra.Command{ Use: "windows", Short: "Manage a project's sync windows", + Example: `#Creating "MyApp" Project in Argo CD with Custom Configuration and gRPC-Web Authentication +argocd proj windows --auth-token "your-auth-token" \ + --client-crt "/path/to/client.crt" \ + --client-crt-key "/path/to/client.key" \ + --config "/path/to/custom/config.yaml" \ + --grpc-web \ + --grpc-web-root-path "/custom/root/path" \ + --server "argocd-server.example.com" \ + "MyApp" + +#Configuring "Development" Project in Argo CD with HTTP, Custom kube-context, and Debug Logging. +argocd proj windows --plaintext \ + --kube-context "my-kube-context" \ + --loglevel "debug" \ + --server "argocd-server.internal.local" \ + "Development"`, Run: func(c *cobra.Command, args []string) { c.HelpFunc()(c, args) os.Exit(1) @@ -42,6 +58,21 @@ func NewProjectWindowsDisableManualSyncCommand(clientOpts *argocdclient.ClientOp Use: "disable-manual-sync PROJECT ID", Short: "Disable manual sync for a sync window", Long: "Disable manual sync for a sync window. Requires ID which can be found by running \"argocd proj windows list PROJECT\"", + Example: `#Disabling Manual Synchronization for Project "my-project-id" in Argo CD with Custom Configuration +argocd proj windows disable-manual-sync my-project-id \ + --auth-token "your-auth-token" \ + --kube-context "my-kube-context" \ + --loglevel "debug" \ + --server "argocd-server.example.com" + + +#Disabling Manual Synchronization for Project "another-project-id" in Argo CD with Client Certificates and gRPC-Web Configuration +aargocd proj windows disable-manual-sync another-project-id \ + --client-crt "/path/to/client.crt" \ + --client-crt-key "/path/to/client.key" \ + --grpc-web \ + --grpc-web-root-path "/custom/root/path" \ + --server "argocd-server.internal.local"`, Run: func(c *cobra.Command, args []string) { ctx := c.Context() @@ -79,6 +110,20 @@ func NewProjectWindowsEnableManualSyncCommand(clientOpts *argocdclient.ClientOpt Use: "enable-manual-sync PROJECT ID", Short: "Enable manual sync for a sync window", Long: "Enable manual sync for a sync window. Requires ID which can be found by running \"argocd proj windows list PROJECT\"", + Example: `#Enabling Manual Synchronization for Project 'my-project-id' in Argo CD with Custom Configuration: +argocd proj windows enable-manual-sync my-project-id \ + --auth-token "your-auth-token" \ + --kube-context "my-kube-context" \ + --grpc-web \ + --loglevel "debug" + + +#Enabling Manual Synchronization for Project 'another-project-id' in Argo CD with Client Certificates and Port Forwarding +argocd proj windows enable-manual-sync another-project-id \ + --client-crt "/path/to/client.crt" \ + --client-crt-key "/path/to/client.key" \ + --port-forward \ + --port-forward-namespace "my-namespace"`, Run: func(c *cobra.Command, args []string) { ctx := c.Context() @@ -180,6 +225,18 @@ func NewProjectWindowsDeleteCommand(clientOpts *argocdclient.ClientOptions) *cob var command = &cobra.Command{ Use: "delete PROJECT ID", Short: "Delete a sync window from a project. Requires ID which can be found by running \"argocd proj windows list PROJECT\"", + Example: `#Deleting Project 'my-project-id' in Argo CD with Custom Configuration +argocd proj windows delete my-project-id \ + --auth-token "your-auth-token" \ + --kube-context "my-kube-context" \ + --loglevel "debug" + +#Deleting Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip +argocd proj windows delete another-project-id \ + --client-crt "/path/to/client.crt" \ + --client-crt-key "/path/to/client.key" \ + --insecure \ + --server-crt "/path/to/server.crt"`, Run: func(c *cobra.Command, args []string) { ctx := c.Context() @@ -274,12 +331,22 @@ func NewProjectWindowsListCommand(clientOpts *argocdclient.ClientOptions) *cobra var command = &cobra.Command{ Use: "list PROJECT", Short: "List project sync windows", - Example: `# List project windows + Example: `#Listing Windows for Project 'my-project-id' in Argo CD with Custom Configuration +argocd proj windows list my-project-id \ + --auth-token "your-auth-token" \ + --kube-context "my-kube-context" \ + --loglevel "debug" +#Listing Windows for Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip +argocd proj windows list another-project-id \ + --client-crt "/path/to/client.crt" \ + --client-crt-key "/path/to/client.key" \ + --insecure \ + --server-crt "/path/to/server.crt" +#List project windows argocd proj windows list PROJECT - + # List project windows in yaml format -argocd proj windows list PROJECT -o yaml -`, +argocd proj windows list PROJECT -o yaml`, Run: func(c *cobra.Command, args []string) { ctx := c.Context() @@ -312,8 +379,8 @@ argocd proj windows list PROJECT -o yaml func printSyncWindows(proj *v1alpha1.AppProject) { w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) var fmtStr string - headers := []interface{}{"ID", "STATUS", "KIND", "SCHEDULE", "DURATION", "APPLICATIONS", "NAMESPACES", "CLUSTERS", "MANUALSYNC", "TIMEZONE"} - fmtStr = strings.Repeat("%s\t", len(headers)) + "\n" + headers := []interface{}{"ID", "STATUS", "KIND", "SCHEDULE", "DURATION", "APPLICATIONS", "NAMESPACES", "CLUSTERS", "MANUALSYNC"} + fmtStr = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" fmt.Fprintf(w, fmtStr, headers...) if proj.Spec.SyncWindows.HasWindows() { for i, window := range proj.Spec.SyncWindows { @@ -327,7 +394,6 @@ func printSyncWindows(proj *v1alpha1.AppProject) { formatListOutput(window.Namespaces), formatListOutput(window.Clusters), formatManualOutput(window.ManualSync), - window.TimeZone, } fmt.Fprintf(w, fmtStr, vals...) } diff --git a/docs/operator-manual/notifications/templates.md b/docs/operator-manual/notifications/templates.md index 1d80f20953b24..f865229e12835 100644 --- a/docs/operator-manual/notifications/templates.md +++ b/docs/operator-manual/notifications/templates.md @@ -20,7 +20,6 @@ Each template has access to the following fields: - `app` holds the application object. - `context` is a user-defined string map and might include any string keys and values. -- `secrets` provides access to sensitive data stored in `argocd-notifications-secret` - `serviceType` holds the notification service type name (such as "slack" or "email). The field can be used to conditionally render service-specific fields. - `recipient` holds the recipient name. @@ -44,39 +43,6 @@ data: message: "Something happened in {{ .context.environmentName }} in the {{ .context.region }} data center!" ``` -## Defining and using secrets within notification templates - -Some notification service use cases will require the use of secrets within templates. This can be achieved with the use of -the `secrets` data variable available within the templates. - -Given that we have the following `argocd-notifications-secret`: - -```yaml -apiVersion: v1 -kind: Secret -metadata: - name: argocd-notifications-secret -stringData: - sampleWebhookToken: secret-token -type: Opaque -``` - -We can use the defined `sampleWebhookToken` in a template as such: - -```yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: argocd-notifications-cm -data: - template.trigger-webhook: | - webhook: - sample-webhook: - method: POST - path: 'webhook/endpoint/with/auth' - body: 'token={{ .secrets.sampleWebhookToken }}&variables[APP_SOURCE_PATH]={{ .app.spec.source.path }} -``` - ## Notification Service Specific Fields The `message` field of the template definition allows creating a basic notification for any notification service. You can leverage notification service-specific diff --git a/docs/snyk/index.md b/docs/snyk/index.md index a8e97a7018013..fddd77111a7e3 100644 --- a/docs/snyk/index.md +++ b/docs/snyk/index.md @@ -13,11 +13,11 @@ recent minor releases. | | Critical | High | Medium | Low | |---:|:--------:|:----:|:------:|:---:| -| [go.mod](master/argocd-test.html) | 0 | 0 | 6 | 0 | +| [go.mod](master/argocd-test.html) | 0 | 0 | 5 | 0 | | [ui/yarn.lock](master/argocd-test.html) | 0 | 0 | 0 | 0 | | [dex:v2.37.0](master/ghcr.io_dexidp_dex_v2.37.0.html) | 1 | 0 | 3 | 0 | | [haproxy:2.6.14-alpine](master/haproxy_2.6.14-alpine.html) | 0 | 0 | 0 | 0 | -| [argocd:latest](master/quay.io_argoproj_argocd_latest.html) | 0 | 0 | 4 | 19 | +| [argocd:latest](master/quay.io_argoproj_argocd_latest.html) | 0 | 0 | 3 | 19 | | [redis:7.0.11-alpine](master/redis_7.0.11-alpine.html) | 1 | 0 | 3 | 0 | | [install.yaml](master/argocd-iac-install.html) | - | - | - | - | | [namespace-install.yaml](master/argocd-iac-namespace-install.html) | - | - | - | - | @@ -26,11 +26,11 @@ recent minor releases. | | Critical | High | Medium | Low | |---:|:--------:|:----:|:------:|:---:| -| [go.mod](v2.9.0-rc2/argocd-test.html) | 0 | 2 | 6 | 0 | +| [go.mod](v2.9.0-rc2/argocd-test.html) | 0 | 2 | 5 | 0 | | [ui/yarn.lock](v2.9.0-rc2/argocd-test.html) | 0 | 0 | 0 | 0 | | [dex:v2.37.0](v2.9.0-rc2/ghcr.io_dexidp_dex_v2.37.0.html) | 1 | 0 | 3 | 0 | | [haproxy:2.6.14-alpine](v2.9.0-rc2/haproxy_2.6.14-alpine.html) | 0 | 0 | 0 | 0 | -| [argocd:v2.9.0-rc2](v2.9.0-rc2/quay.io_argoproj_argocd_v2.9.0-rc2.html) | 0 | 2 | 7 | 20 | +| [argocd:v2.9.0-rc2](v2.9.0-rc2/quay.io_argoproj_argocd_v2.9.0-rc2.html) | 0 | 2 | 6 | 20 | | [redis:7.0.11-alpine](v2.9.0-rc2/redis_7.0.11-alpine.html) | 1 | 0 | 3 | 0 | | [install.yaml](v2.9.0-rc2/argocd-iac-install.html) | - | - | - | - | | [namespace-install.yaml](v2.9.0-rc2/argocd-iac-namespace-install.html) | - | - | - | - | @@ -39,11 +39,11 @@ recent minor releases. | | Critical | High | Medium | Low | |---:|:--------:|:----:|:------:|:---:| -| [go.mod](v2.8.4/argocd-test.html) | 0 | 2 | 6 | 0 | +| [go.mod](v2.8.4/argocd-test.html) | 0 | 2 | 5 | 0 | | [ui/yarn.lock](v2.8.4/argocd-test.html) | 0 | 0 | 0 | 0 | | [dex:v2.37.0](v2.8.4/ghcr.io_dexidp_dex_v2.37.0.html) | 1 | 0 | 3 | 0 | | [haproxy:2.6.14-alpine](v2.8.4/haproxy_2.6.14-alpine.html) | 0 | 0 | 0 | 0 | -| [argocd:v2.8.4](v2.8.4/quay.io_argoproj_argocd_v2.8.4.html) | 0 | 2 | 7 | 20 | +| [argocd:v2.8.4](v2.8.4/quay.io_argoproj_argocd_v2.8.4.html) | 0 | 2 | 6 | 20 | | [redis:7.0.11-alpine](v2.8.4/redis_7.0.11-alpine.html) | 1 | 0 | 3 | 0 | | [install.yaml](v2.8.4/argocd-iac-install.html) | - | - | - | - | | [namespace-install.yaml](v2.8.4/argocd-iac-namespace-install.html) | - | - | - | - | @@ -56,7 +56,7 @@ recent minor releases. | [ui/yarn.lock](v2.7.14/argocd-test.html) | 0 | 1 | 0 | 0 | | [dex:v2.37.0](v2.7.14/ghcr.io_dexidp_dex_v2.37.0.html) | 1 | 0 | 3 | 0 | | [haproxy:2.6.14-alpine](v2.7.14/haproxy_2.6.14-alpine.html) | 0 | 0 | 0 | 0 | -| [argocd:v2.7.14](v2.7.14/quay.io_argoproj_argocd_v2.7.14.html) | 0 | 2 | 7 | 20 | +| [argocd:v2.7.14](v2.7.14/quay.io_argoproj_argocd_v2.7.14.html) | 0 | 2 | 6 | 20 | | [redis:7.0.11-alpine](v2.7.14/redis_7.0.11-alpine.html) | 1 | 0 | 3 | 0 | | [install.yaml](v2.7.14/argocd-iac-install.html) | - | - | - | - | | [namespace-install.yaml](v2.7.14/argocd-iac-namespace-install.html) | - | - | - | - | @@ -69,7 +69,7 @@ recent minor releases. | [ui/yarn.lock](v2.6.15/argocd-test.html) | 0 | 1 | 0 | 0 | | [dex:v2.37.0](v2.6.15/ghcr.io_dexidp_dex_v2.37.0.html) | 1 | 0 | 3 | 0 | | [haproxy:2.6.14-alpine](v2.6.15/haproxy_2.6.14-alpine.html) | 0 | 0 | 0 | 0 | -| [argocd:v2.6.15](v2.6.15/quay.io_argoproj_argocd_v2.6.15.html) | 0 | 2 | 7 | 20 | +| [argocd:v2.6.15](v2.6.15/quay.io_argoproj_argocd_v2.6.15.html) | 0 | 2 | 6 | 20 | | [redis:7.0.11-alpine](v2.6.15/redis_7.0.11-alpine.html) | 1 | 0 | 3 | 0 | | [install.yaml](v2.6.15/argocd-iac-install.html) | - | - | - | - | | [namespace-install.yaml](v2.6.15/argocd-iac-namespace-install.html) | - | - | - | - | diff --git a/docs/snyk/master/argocd-iac-install.html b/docs/snyk/master/argocd-iac-install.html index 418bfdecc40fa..cdbbcd216e583 100644 --- a/docs/snyk/master/argocd-iac-install.html +++ b/docs/snyk/master/argocd-iac-install.html @@ -456,7 +456,7 @@
LGPL-3.0 license
- -LGPL-3.0 license
- -Note: Versions mentioned in the description apply only to the upstream glibc
package and not the glibc
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
A flaw was found in the GNU C Library. A recent fix for CVE-2023-4806 introduced the potential for a memory leak, which may result in an application crash.
-There is no fixed version for Ubuntu:22.04
glibc
.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy - handshake.
-When curl is asked to pass along the host name to the SOCKS5 proxy to allow - that to resolve the address instead of it getting done by curl itself, the - maximum length that host name can be is 255 bytes.
-If the host name is detected to be longer, curl switches to local name - resolving and instead passes on the resolved address only. Due to this bug, - the local variable that means "let the host resolve the name" could get the - wrong value during a slow SOCKS5 handshake, and contrary to the intention, - copy the too long host name to the target buffer instead of copying just the - resolved address there.
-The target buffer being a heap based buffer, and the host name coming from the - URL that curl has been told to operate with.
+in the SOCKS5
proxy handshake process when the hostname is longer than the target buffer.
+ The local variable socks5_resolve_local
could get the wrong value during a slow SOCKS5 handshake.
+ Since the code wrongly thinks it should pass on the hostname, even though the hostname is too long to fit, the memory copy can overflow the allocated target buffer.
This is only exploitable if the SOCKS5 handshake is slow enough to trigger a local variable bug and the client uses a hostname longer than the download buffer.
+Exploiting this vulnerability could allow an attacker to execute arbitrary code on the target system under certain conditions.
+Note:
+An overflow is only possible in applications that don't set CURLOPT_BUFFERSIZE
or set it smaller than 65541.
+ Since the curl tool sets CURLOPT_BUFFERSIZE
to 100kB by default, it is not vulnerable unless the user sets the rate limiting to a rate smaller than 65541 bytes/second.
The options that cause SOCKS5 with remote hostname to be used in libcurl
:
CURLOPT_PROXYTYPE
set to type CURLPROXY_SOCKS5_HOSTNAME
, or:
+ CURLOPT_PROXY
or CURLOPT_PRE_PROXY
set to use the scheme socks5h://
One of the proxy environment variables can be set to use the socks5h://
scheme. For example, http_proxy
, HTTPS_PROXY
or ALL_PROXY
.
The options that cause SOCKS5 with remote hostname to be used in the curl
tool:
--socks5-hostname
, --proxy
or --preproxy
set to use the scheme socks5h://
Environment variables as described in the libcurl section.
+Changelog:
+2023-10-04: Initial publication
+2023-10-11: Published updated information, including CWE, CVSS, official references and affected versions range.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
Note: Versions mentioned in the description apply only to the upstream glibc
package and not the glibc
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
A flaw was found in the GNU C Library. A recent fix for CVE-2023-4806 introduced the potential for a memory leak, which may result in an application crash.
-There is no fixed version for Ubuntu:22.04
glibc
.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw allows an attacker to insert cookies at will into a running program - using libcurl, if the specific series of conditions are met.
-libcurl performs transfers. In its API, an application creates "easy handles" - that are the individual handles for single transfers.
-libcurl provides a function call that duplicates en easy handle called - curl_easy_duphandle.
-If a transfer has cookies enabled when the handle is duplicated, the
- cookie-enable state is also cloned - but without cloning the actual
- cookies. If the source handle did not read any cookies from a specific file on
- disk, the cloned version of the handle would instead store the file name as
- none
(using the four ASCII letters, no quotes).
Subsequent use of the cloned handle that does not explicitly set a source to
- load cookies from would then inadvertently load cookies from a file named
- none
- if such a file exists and is readable in the current directory of the
- program using libcurl. And if using the correct file format of course.
This vulnerability has not been analyzed by NVD yet.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy - handshake.
-When curl is asked to pass along the host name to the SOCKS5 proxy to allow - that to resolve the address instead of it getting done by curl itself, the - maximum length that host name can be is 255 bytes.
-If the host name is detected to be longer, curl switches to local name - resolving and instead passes on the resolved address only. Due to this bug, - the local variable that means "let the host resolve the name" could get the - wrong value during a slow SOCKS5 handshake, and contrary to the intention, - copy the too long host name to the target buffer instead of copying just the - resolved address there.
-The target buffer being a heap based buffer, and the host name coming from the - URL that curl has been told to operate with.
+in the SOCKS5
proxy handshake process when the hostname is longer than the target buffer.
+ The local variable socks5_resolve_local
could get the wrong value during a slow SOCKS5 handshake.
+ Since the code wrongly thinks it should pass on the hostname, even though the hostname is too long to fit, the memory copy can overflow the allocated target buffer.
This is only exploitable if the SOCKS5 handshake is slow enough to trigger a local variable bug and the client uses a hostname longer than the download buffer.
+Exploiting this vulnerability could allow an attacker to execute arbitrary code on the target system under certain conditions.
+Note:
+An overflow is only possible in applications that don't set CURLOPT_BUFFERSIZE
or set it smaller than 65541.
+ Since the curl tool sets CURLOPT_BUFFERSIZE
to 100kB by default, it is not vulnerable unless the user sets the rate limiting to a rate smaller than 65541 bytes/second.
The options that cause SOCKS5 with remote hostname to be used in libcurl
:
CURLOPT_PROXYTYPE
set to type CURLPROXY_SOCKS5_HOSTNAME
, or:
+ CURLOPT_PROXY
or CURLOPT_PRE_PROXY
set to use the scheme socks5h://
One of the proxy environment variables can be set to use the socks5h://
scheme. For example, http_proxy
, HTTPS_PROXY
or ALL_PROXY
.
The options that cause SOCKS5 with remote hostname to be used in the curl
tool:
--socks5-hostname
, --proxy
or --preproxy
set to use the scheme socks5h://
Environment variables as described in the libcurl section.
+Changelog:
+2023-10-04: Initial publication
+2023-10-11: Published updated information, including CWE, CVSS, official references and affected versions range.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
Note: Versions mentioned in the description apply only to the upstream glibc
package and not the glibc
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
A flaw was found in the GNU C Library. A recent fix for CVE-2023-4806 introduced the potential for a memory leak, which may result in an application crash.
-There is no fixed version for Ubuntu:22.04
glibc
.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw allows an attacker to insert cookies at will into a running program - using libcurl, if the specific series of conditions are met.
-libcurl performs transfers. In its API, an application creates "easy handles" - that are the individual handles for single transfers.
-libcurl provides a function call that duplicates en easy handle called - curl_easy_duphandle.
-If a transfer has cookies enabled when the handle is duplicated, the
- cookie-enable state is also cloned - but without cloning the actual
- cookies. If the source handle did not read any cookies from a specific file on
- disk, the cloned version of the handle would instead store the file name as
- none
(using the four ASCII letters, no quotes).
Subsequent use of the cloned handle that does not explicitly set a source to
- load cookies from would then inadvertently load cookies from a file named
- none
- if such a file exists and is readable in the current directory of the
- program using libcurl. And if using the correct file format of course.
This vulnerability has not been analyzed by NVD yet.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
LGPL-3.0 license
- -Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy - handshake.
-When curl is asked to pass along the host name to the SOCKS5 proxy to allow - that to resolve the address instead of it getting done by curl itself, the - maximum length that host name can be is 255 bytes.
-If the host name is detected to be longer, curl switches to local name - resolving and instead passes on the resolved address only. Due to this bug, - the local variable that means "let the host resolve the name" could get the - wrong value during a slow SOCKS5 handshake, and contrary to the intention, - copy the too long host name to the target buffer instead of copying just the - resolved address there.
-The target buffer being a heap based buffer, and the host name coming from the - URL that curl has been told to operate with.
+in the SOCKS5
proxy handshake process when the hostname is longer than the target buffer.
+ The local variable socks5_resolve_local
could get the wrong value during a slow SOCKS5 handshake.
+ Since the code wrongly thinks it should pass on the hostname, even though the hostname is too long to fit, the memory copy can overflow the allocated target buffer.
This is only exploitable if the SOCKS5 handshake is slow enough to trigger a local variable bug and the client uses a hostname longer than the download buffer.
+Exploiting this vulnerability could allow an attacker to execute arbitrary code on the target system under certain conditions.
+Note:
+An overflow is only possible in applications that don't set CURLOPT_BUFFERSIZE
or set it smaller than 65541.
+ Since the curl tool sets CURLOPT_BUFFERSIZE
to 100kB by default, it is not vulnerable unless the user sets the rate limiting to a rate smaller than 65541 bytes/second.
The options that cause SOCKS5 with remote hostname to be used in libcurl
:
CURLOPT_PROXYTYPE
set to type CURLPROXY_SOCKS5_HOSTNAME
, or:
+ CURLOPT_PROXY
or CURLOPT_PRE_PROXY
set to use the scheme socks5h://
One of the proxy environment variables can be set to use the socks5h://
scheme. For example, http_proxy
, HTTPS_PROXY
or ALL_PROXY
.
The options that cause SOCKS5 with remote hostname to be used in the curl
tool:
--socks5-hostname
, --proxy
or --preproxy
set to use the scheme socks5h://
Environment variables as described in the libcurl section.
+Changelog:
+2023-10-04: Initial publication
+2023-10-11: Published updated information, including CWE, CVSS, official references and affected versions range.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
LGPL-3.0 license
- -Note: Versions mentioned in the description apply only to the upstream glibc
package and not the glibc
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
A flaw was found in the GNU C Library. A recent fix for CVE-2023-4806 introduced the potential for a memory leak, which may result in an application crash.
-There is no fixed version for Ubuntu:22.04
glibc
.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw allows an attacker to insert cookies at will into a running program - using libcurl, if the specific series of conditions are met.
-libcurl performs transfers. In its API, an application creates "easy handles" - that are the individual handles for single transfers.
-libcurl provides a function call that duplicates en easy handle called - curl_easy_duphandle.
-If a transfer has cookies enabled when the handle is duplicated, the
- cookie-enable state is also cloned - but without cloning the actual
- cookies. If the source handle did not read any cookies from a specific file on
- disk, the cloned version of the handle would instead store the file name as
- none
(using the four ASCII letters, no quotes).
Subsequent use of the cloned handle that does not explicitly set a source to
- load cookies from would then inadvertently load cookies from a file named
- none
- if such a file exists and is readable in the current directory of the
- program using libcurl. And if using the correct file format of course.
This vulnerability has not been analyzed by NVD yet.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
LGPL-3.0 license
- -Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy - handshake.
-When curl is asked to pass along the host name to the SOCKS5 proxy to allow - that to resolve the address instead of it getting done by curl itself, the - maximum length that host name can be is 255 bytes.
-If the host name is detected to be longer, curl switches to local name - resolving and instead passes on the resolved address only. Due to this bug, - the local variable that means "let the host resolve the name" could get the - wrong value during a slow SOCKS5 handshake, and contrary to the intention, - copy the too long host name to the target buffer instead of copying just the - resolved address there.
-The target buffer being a heap based buffer, and the host name coming from the - URL that curl has been told to operate with.
+in the SOCKS5
proxy handshake process when the hostname is longer than the target buffer.
+ The local variable socks5_resolve_local
could get the wrong value during a slow SOCKS5 handshake.
+ Since the code wrongly thinks it should pass on the hostname, even though the hostname is too long to fit, the memory copy can overflow the allocated target buffer.
This is only exploitable if the SOCKS5 handshake is slow enough to trigger a local variable bug and the client uses a hostname longer than the download buffer.
+Exploiting this vulnerability could allow an attacker to execute arbitrary code on the target system under certain conditions.
+Note:
+An overflow is only possible in applications that don't set CURLOPT_BUFFERSIZE
or set it smaller than 65541.
+ Since the curl tool sets CURLOPT_BUFFERSIZE
to 100kB by default, it is not vulnerable unless the user sets the rate limiting to a rate smaller than 65541 bytes/second.
The options that cause SOCKS5 with remote hostname to be used in libcurl
:
CURLOPT_PROXYTYPE
set to type CURLPROXY_SOCKS5_HOSTNAME
, or:
+ CURLOPT_PROXY
or CURLOPT_PRE_PROXY
set to use the scheme socks5h://
One of the proxy environment variables can be set to use the socks5h://
scheme. For example, http_proxy
, HTTPS_PROXY
or ALL_PROXY
.
The options that cause SOCKS5 with remote hostname to be used in the curl
tool:
--socks5-hostname
, --proxy
or --preproxy
set to use the scheme socks5h://
Environment variables as described in the libcurl section.
+Changelog:
+2023-10-04: Initial publication
+2023-10-11: Published updated information, including CWE, CVSS, official references and affected versions range.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
LGPL-3.0 license
- -Note: Versions mentioned in the description apply only to the upstream glibc
package and not the glibc
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
A flaw was found in the GNU C Library. A recent fix for CVE-2023-4806 introduced the potential for a memory leak, which may result in an application crash.
-There is no fixed version for Ubuntu:22.04
glibc
.
Note: Versions mentioned in the description apply only to the upstream curl
package and not the curl
package as distributed by Ubuntu
.
- See How to fix?
for Ubuntu:22.04
relevant fixed versions and status.
This flaw allows an attacker to insert cookies at will into a running program - using libcurl, if the specific series of conditions are met.
-libcurl performs transfers. In its API, an application creates "easy handles" - that are the individual handles for single transfers.
-libcurl provides a function call that duplicates en easy handle called - curl_easy_duphandle.
-If a transfer has cookies enabled when the handle is duplicated, the
- cookie-enable state is also cloned - but without cloning the actual
- cookies. If the source handle did not read any cookies from a specific file on
- disk, the cloned version of the handle would instead store the file name as
- none
(using the four ASCII letters, no quotes).
Subsequent use of the cloned handle that does not explicitly set a source to
- load cookies from would then inadvertently load cookies from a file named
- none
- if such a file exists and is readable in the current directory of the
- program using libcurl. And if using the correct file format of course.
This vulnerability has not been analyzed by NVD yet.
Upgrade Ubuntu:22.04
curl
to version 7.81.0-1ubuntu1.14 or higher.
{renderLog(log, lineNum)} @@ -191,7 +177,11 @@ export const PodsLogsViewer = (props: PodLogsProps) => {