Affected by GO-2022-0559
and 8 other vulnerabilities
GO-2022-0559: HashiCorp Consul and Consul Enterprise 1.10.1 Txn.Apply endpoint allowed services to register proxies for other services, enabling access to service traffic. in github.com/hashicorp/consul
GO-2022-0593: HashiCorp Consul Privilege Escalation Vulnerability in github.com/hashicorp/consul
GO-2022-0615: Hashicorp Consul HTTP health check endpoints returning an HTTP redirect may be abused as SSRF vector in github.com/hashicorp/consul
GO-2022-0894: Hashicorp Consul Missing SSL Certificate Validation in github.com/hashicorp/consul
GO-2022-0895: HashiCorp Consul L7 deny intention results in an allow action in github.com/hashicorp/consul
GO-2022-0953: HashiCorp Consul Ingress Gateway Panic Can Shutdown Servers in github.com/hashicorp/consul
GO-2022-1029: HashiCorp Consul vulnerable to authorization bypass in github.com/hashicorp/consul
GO-2023-1827: Hashicorp Consul vulnerable to denial of service in github.com/hashicorp/consul
GO-2024-3242: Hashicorp Consul Cross-site Scripting vulnerability in github.com/hashicorp/consul
Package semaphore implements a simple semaphore that is based on
golang.org/x/sync/semaphore but doesn't support weights. It's advantage over
a simple buffered chan is that the capacity of the semaphore (i.e. the number
of slots available) can be changed dynamically at runtime without waiting for
all existing work to stop. This makes it easier to implement e.g. concurrency
limits on certain operations that can be reconfigured at runtime.
NewDynamic returns a dynamic semaphore with the given initial capacity. Note
that this is for convenience and to match golang.org/x/sync/semaphore however
it's possible to use a zero-value semaphore provided SetSize is called before
use.
Acquire attempts to acquire one "slot" in the semaphore, blocking only until
ctx is Done. On success, returns nil. On failure, returns ctx.Err() and leaves
the semaphore unchanged.
If ctx is already done, Acquire may still succeed without blocking.
SetSize dynamically updates the number of available slots. If there are more
than n slots currently acquired, no further acquires will succeed until
sufficient have been released to take the total outstanding below n again.