Headline
CVE-2023-29195: Bug Report: CreateShard allows shard names with "/", which breaks other commands/components · Issue #12842 · vitessio/vitess
Vitess is a database clustering system for horizontal scaling of MySQL through generalized sharding. Prior to version 16.0.2, users can either intentionally or inadvertently create a shard containing /
characters from VTAdmin such that from that point on, anyone who tries to create a new shard from VTAdmin will receive an error. Attempting to view the keyspace(s) will also no longer work. Creating a shard using vtctldclient
does not have the same problem because the CLI validates the input correctly. Version 16.0.2, corresponding to version 0.16.2 of the go
module, contains a patch for this issue. Some workarounds are available. Always use vtctldclient
to create shards, instead of using VTAdmin; disable creating shards from VTAdmin using RBAC; and/or delete the topology record for the offending shard using the client for your topology server.
Comments
ajm188 added this to Inbox (unplanned/untriaged) in VTAdmin via automation
Apr 5, 2023
ajm188 added a commit to planetscale/vitess that referenced this issue
Apr 5, 2023
Fixes vitessio#12842.
Signed-off-by: Andrew Mason [email protected]
This was referenced
Apr 5, 2023
VTAdmin automation moved this from Inbox (unplanned/untriaged) to Done
Apr 6, 2023
deepthi added a commit that referenced this issue
Apr 6, 2023
* Disallow the slash character in shard names
Fixes #12842.
Signed-off-by: Andrew Mason [email protected]
* add release note
Signed-off-by: Andrew Mason [email protected]
* Update go/vt/topo/shard.go
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
* Update changelog/17.0/17.0.0/summary.md
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
Signed-off-by: Andrew Mason [email protected] Signed-off-by: Andrew Mason [email protected] Co-authored-by: Deepthi Sigireddi [email protected]
ajm188 added a commit to planetscale/vitess that referenced this issue
Apr 6, 2023
* Disallow the slash character in shard names
Fixes vitessio#12842.
Signed-off-by: Andrew Mason [email protected]
* add release note
Signed-off-by: Andrew Mason [email protected]
* Update go/vt/topo/shard.go
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
* Update changelog/17.0/17.0.0/summary.md
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
Signed-off-by: Andrew Mason [email protected] Signed-off-by: Andrew Mason [email protected] Co-authored-by: Deepthi Sigireddi [email protected]
deepthi added a commit that referenced this issue
Apr 12, 2023
…12858)
* [topo] Disallow the slash character in shard names (#12843)
* Disallow the slash character in shard names
Fixes #12842.
Signed-off-by: Andrew Mason [email protected]
* add release note
Signed-off-by: Andrew Mason [email protected]
* Update go/vt/topo/shard.go
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
* Update changelog/17.0/17.0.0/summary.md
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
Signed-off-by: Andrew Mason [email protected] Signed-off-by: Andrew Mason [email protected] Co-authored-by: Deepthi Sigireddi [email protected]
* add changelog stub
Signed-off-by: Andrew Mason [email protected]
* fix version name
Signed-off-by: Andrew Mason [email protected]
Signed-off-by: Andrew Mason [email protected] Signed-off-by: Andrew Mason [email protected] Co-authored-by: Deepthi Sigireddi [email protected]
timvaillancourt pushed a commit to timvaillancourt/vitess that referenced this issue
Apr 15, 2023
* Disallow the slash character in shard names
Fixes vitessio#12842.
Signed-off-by: Andrew Mason [email protected]
* add release note
Signed-off-by: Andrew Mason [email protected]
* Update go/vt/topo/shard.go
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
* Update changelog/17.0/17.0.0/summary.md
Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Andrew Mason [email protected]
Signed-off-by: Andrew Mason [email protected] Signed-off-by: Andrew Mason [email protected] Co-authored-by: Deepthi Sigireddi [email protected] Signed-off-by: Tim Vaillancourt [email protected]
Related news
### Impact Users can either intentionally or inadvertently create a shard containing `/` characters from VTAdmin such that from that point on, anyone who tries to create a new shard from VTAdmin will receive an error. Attempting to view the keyspace(s) will also no longer work. Creating a shard using `vtctldclient` does not have the same problem because the CLI validates the input correctly. ### Patches v16.0.2, corresponding to [0.16.2 on pkg.go.dev](https://pkg.go.dev/vitess.io/[email protected]) ### Workarounds - Always use `vtctldclient` to create shards, instead of using VTAdmin - Disable creating shards from VTAdmin using RBAC - Delete the topology record for the offending shard using the client for your topology server. For example, if you created a shard called `a/b` in keyspace `commerce`, and you are running etcd, it can be deleted by doing something like ``` % etcdctl --endpoints "http://${ETCD_SERVER}" del /vitess/global/keyspaces/commerce/shards/a/b/Shard ``` ### Referenc...