# Vitess v24.0.6

2026-12-02 · [릴리스 노트 원문](https://github.com/vitessio/vitess/releases/tag/v24.0.6) · [전체 정리](https://ratatosk.io/ko/releases/vitess/v24.0.6)

보안 18 · 호환성 변경 1 · 중요 수정 2 · 기능·개선 2 · 기타 2

## 업그레이드 전 확인

### 전제 조건

- **다이제스트 인증을 위한 ZooKeeper ACL 설정**: 업그레이드 전 znode에는 `world:anyone` ACL이 남아 있습니다. 기록된 절차에서는 `addauth digest <user>:<password>`로 인증한 뒤, 전역 루트와 셀 루트의 공통 상위 경로에 `auth::cdrwa`를 재귀적으로 설정합니다. 처음 설정할 때는 어느 구성 요소도 업그레이드하기 전에 모든 구성 요소에 인증 파일을 설정하거나, 한 번의 롤아웃으로 모든 구성 요소를 인증 파일과 함께 재시작합니다.
  > - Znodes created before the upgrade keep their `world:anyone` ACLs. Once every component runs this release with the auth file, run `addauth digest <user>:<password>` in `zkCli.sh`, then `setAcl -R <parent> auth::cdrwa` on the common parent of the global and cell roots (for example `/vitess`), in each ZooKeeper ensemble. Credential rotation and first-time setup are described in [#22231](https://github.com/vitessio/vitess/pull/22231).
- **기존 테이블 바인딩은 업그레이드 후에도 유지**: 샤드 프라이머리의 MERGE 및 FEDERATED 테이블은 `UNION` 또는 `CONNECTION` 바인딩을 유지합니다. 이전 `EXCHANGE PARTITION` 작업은 바이너리 로그나 감사 로그에만 흔적을 남깁니다.
  > - Upgrading doesn't undo bindings made before it. Find MERGE and FEDERATED tables on each shard's primary with `SELECT table_schema, table_name, engine FROM information_schema.tables WHERE engine IN ('MRG_MYISAM', 'FEDERATED')`, check each one's `UNION` list or `CONNECTION` string with `SHOW CREATE TABLE`, and drop any binding that isn't intended. A past `EXCHANGE PARTITION` leaves no such trace; only the binary log or an audit log shows it.

### 알려진 문제

- **파서가 파티션 유지 관리 문과 `SERIAL` 문을 거부할 수 있음**: 파서가 문을 완전히 파싱하지 못하면 해당 문이 거부될 수 있습니다. 안내에는 문마다 파티션 하나만 지정하기, 예외 사용자 지정하기, `SERIAL` 타입을 풀어 쓰기가 대안으로 나와 있습니다.
  > - Partition maintenance that the parser doesn't fully parse is denied for non-exempt callers, such as `ADD PARTITION` with more than one partition definition, or `ADD PARTITION PARTITIONS n`. Add one partition per statement, or run the job as the exempt user. A failing job may only show up later, as inserts that fail past a RANGE table's last bound.
  > - On this release the parser also has no `SERIAL` column type, so an `ALTER TABLE` that defines a `SERIAL` column is denied as well. Spell the type out (`BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE`).

## 보안 (18)

### mTLS 클라이언트 인가 검사에서 검증된 리프 인증서 subject 확인

- 영향 대상: `--grpc-auth-mode=mtls`를 사용하는 프로세스
- 추가 조치: Go 형식으로 표시한 각 클라이언트 인증서 subject와 일치하는 비어 있지 않은 허용 부분 문자열 항목
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

이전에는 허용된 subject가 포함된 자체 서명 인증서를 체인에 추가하면, `--grpc-ca`로 검증되지 않은 인증서인데도 클라이언트가 허용될 수 있었습니다. 업그레이드 후에는 항목이 설정되지 않았거나 비어 있으면 mTLS 프로세스가 시작되지 않습니다. 리프가 아닌 인증서만으로 일치하는 클라이언트는 RPC에서 `client certificate not authorized` (`Unauthenticated`) 오류를 받을 수 있으며, 서버는 이 오류를 로그에 남기지 않습니다.

> ### gRPC mTLS authorization checks only the verified client certificate
> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> #### Impact
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - An entry that matches only a non-leaf certificate, such as an intermediate CA's subject, no longer admits the client. RPCs between components, such as VTGate, VTOrc or vtctld calling an upgraded VTTablet, can fail with `client certificate not authorized` (gRPC code `Unauthenticated`), which the server doesn't log.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### mTLS 인가를 검증된 리프 인증서로 제한

- 영향 대상: `--grpc-auth-mode=mtls`를 사용하는 프로세스
- 추가 조치: 업그레이드 전 `--grpc-auth-mtls-allowed-substrings`를 비어 있지 않은 항목으로 설정하고, 각 클라이언트 인증서의 subject에 Go 형식 기준으로 그중 하나가 포함되는지 확인
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

이전에는 허용된 부분 문자열 검사가 뒤에 추가된 자체 서명 인증서나 다른 리프가 아닌 인증서와 일치할 수 있었습니다. 검증된 리프 인증서의 subject가 일치하지 않아도 클라이언트가 허용될 수 있었습니다. 이제 검증된 리프 인증서의 subject만 검사하므로, 이러한 클라이언트와 subject가 비어 있는 클라이언트는 거부되며 해당 클라이언트의 RPC는 `Unauthenticated` 오류로 실패할 수 있습니다.

> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### `--grpc-auth-mtls-allowed-substrings`의 빈 항목 거부

- 영향 대상: `--grpc-auth-mtls-allowed-substrings`를 사용하는 mTLS 인증
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

이전에는 플래그 값이 설정되지 않았거나 비어 있을 때, 또는 앞이나 뒤에 콜론이 있거나 콜론이 연속될 때 생기는 빈 항목이 모든 인증서 subject와 일치했습니다. 이제 빈 항목이 있는 상태로 mTLS 모드에서 시작한 프로세스는 `Failed to load auth plugin`을 기록하고 종료 상태 1로 끝납니다. 리프 인증서가 아닌 인증서에만 일치하는 항목은 더 이상 클라이언트를 허용하지 않습니다.

> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### 엄격한 테이블 ACL에서 부분 파싱된 `ALTER TABLE` 및 `CREATE INDEX` 거부

- 영향 대상: 엄격한 테이블 ACL이 활성화된 태블릿
- 추가 조치: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

이전에는 파싱되지 않은 뒷부분에 플래너가 확인하지 않은 테이블이 지정될 수 있었습니다. 이제 테이블 집합을 판별할 수 없는 경우, 호출자에게 ACL 예외가 적용되거나 모든 테이블에 필요한 역할이 있는 경우가 아니면 이 문은 거부됩니다.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - a partially parsed `ALTER TABLE` or `CREATE INDEX`, and a `CREATE TABLE` or `ALTER TABLE` that sets `CONNECTION`, are denied with `command denied ... for a table set that cannot be determined`. The exceptions are the exempt ACL (`--queryserver-config-acl-exempt-acl`) and a caller with every role in a table group covering every table (`%`).

### VTGate MySQL 패킷 버퍼 재사용 수정

- 영향 대상: VTGate MySQL 서버에 접속한 연결
- [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2)

핸들러가 공유 버퍼가 반환된 뒤에도 패킷을 계속 사용하고 다른 연결이 그 버퍼의 데이터를 덮어쓰면, 인증 전환 검사, 복제 명령 인수, 일부 형식이 잘못된 명령에 대한 오류 응답에 다른 연결의 바이트가 사용될 수 있었습니다. 이제 서버는 패킷을 재활용하기 전에 데이터를 읽고, 인증 전환 데이터에는 별도 버퍼를 사용하며, 재활용한 읽기 패킷은 다시 사용하기 전에 비웁니다.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### zk2topo 토폴로지 ACL 노출 수정

- 영향 대상: `--topo-zk-auth-file`을 사용하는 ZooKeeper 배포
- [GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)

이전에는 `zk2topo`가 토폴로지 znode를 개방된 ACL로 만들어, ZooKeeper 앙상블에 접속할 수 있는 모든 클라이언트가 토폴로지를 읽고 변경하거나 삭제할 수 있었습니다. 이제 인증된 아이덴티티만 접근할 수 있습니다. 다른 아이덴티티를 사용하거나 아이덴티티가 없는 컴포넌트는 `zk: not authenticated` 오류를 받습니다.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.
> - Every component that shares the topology must use the same ZooKeeper identity, `vtctldclient --server internal` and `topo2topo` included. A component with another identity, or none, gets `zk: not authenticated`.

### ZooKeeper 토폴로지 접근을 인증 파일 아이덴티티로 제한

- 영향 대상: `--topo-zk-auth-file`로 구성된 ZooKeeper 토폴로지
- 추가 조치: 토폴로지를 공유하는 모든 구성 요소에서 동일한 ZooKeeper 아이덴티티 사용. 업그레이드 전 znode에는 모든 구성 요소가 인증 파일을 사용해 이 릴리스를 실행한 뒤, 각 앙상블의 공통 부모에서 `addauth digest <user>:<password>` 및 `setAcl -R <parent> auth::cdrwa` 실행 필요
- [GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)

이전에는 앙상블에 접근할 수 있는 클라이언트라면 누구나 `world:anyone` ACL로 생성된 znode를 읽거나 변경하거나 삭제할 수 있었습니다. 이제 새 znode에는 인증 파일 아이덴티티만 접근할 수 있습니다. 인증 파일을 읽거나 파싱하는 과정 또는 `AddAuth`에서 오류가 발생하거나, 비밀번호가 없는 `digest` 파일을 사용하면 인증 없이 계속 진행하는 대신 연결 또는 토폴로지 호출이 실패합니다. 업그레이드 전에 생성된 znode에는 기존 `world:anyone` ACL이 그대로 유지됩니다.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.
> - A component whose auth file can't be read or parsed, or a `digest` file without a password, now fails every topology call. Before upgrading, check that no component logs `failed to read topo-zk-auth-file`, `failed to parse topo-zk-auth-file contents` or `failed to add auth from topo-zk-auth-file`.

### 테이블 옵션에 지정된 테이블에 대한 엄격한 ACL 검사

- 영향 대상: 엄격한 테이블 ACL을 사용하는 tablet 구성
- 추가 조치: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

이전에는 `CREATE TABLE` 또는 `ALTER TABLE`에서 지정한 테이블만 검사했습니다. 따라서 해당 테이블에 `ADMIN` 권한이 있는 사용자는 ACL과 관계없이 테이블 옵션에 지정된 다른 테이블도 읽고 쓸 수 있었습니다. 이제 테이블 옵션에 지정된 모든 테이블은 MERGE 테이블의 `UNION=(...)`에 포함된 테이블을 비롯해 `READER` 및 `WRITER` 검사를 통과해야 합니다.

> ### Table ACL: tables bound by MERGE `UNION`, `CREATE TABLE ... LIKE` and `EXCHANGE PARTITION` are checked
> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - tables named by a table option, and the source of `CREATE TABLE ... LIKE`, require READER and WRITER;

### `CREATE TABLE ... LIKE` 소스 ACL 검사 강제 적용

- 영향 대상: strict table ACL을 활성화한 태블릿 구성
- 추가 조치: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

이전에는 대상 테이블만 검사하고 소스는 검사하지 않았으며, MERGE 소스의 `UNION` 목록도 함께 전달될 수 있었습니다. 이제 소스는 `READER` 및 `WRITER` 검사를 통과해야 합니다.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - tables named by a table option, and the source of `CREATE TABLE ... LIKE`, require READER and WRITER;

### Strict table ACL의 `EXCHANGE PARTITION` 양쪽 테이블 검사

- 영향 대상: strict table ACL이 활성화된 tablet 구성
- 추가 조치: `--queryserver-config-strict-table-acl` 플래그
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

이전에는 `ALTER TABLE ... EXCHANGE PARTITION`을 수행할 때 한 테이블에 접근 권한이 있는 호출자가 다른 테이블의 ACL을 우회해 해당 테이블을 읽거나 쓸 수 있었습니다. 이제 두 테이블 모두 ADMIN, READER, WRITER 검사를 통과해야 합니다.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - both tables of `EXCHANGE PARTITION` require ADMIN, READER and WRITER;

### 엄격한 테이블 ACL에서 `CONNECTION` 테이블 바인딩 차단

- 영향 대상: strict table ACL을 사용하는 tablet 구성
- 추가 조치: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

이전에는 ACL이 이름으로 검사할 수 없는 테이블에 `CONNECTION` 문자열을 바인딩할 수 있어, ACL이 접근을 거부한 테이블에도 접근할 수 있었습니다. 해당 스토리지 엔진을 사용 설정한 경우의 FEDERATED 테이블이 그 예입니다. 이제 이런 문장은 `command denied ...` 오류와 함께 거부됩니다. 단, ACL 예외 사용자와 모든 테이블을 포함하는 테이블 그룹(`%`)의 모든 역할을 보유한 호출자는 예외입니다.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - a partially parsed `ALTER TABLE` or `CREATE INDEX`, and a `CREATE TABLE` or `ALTER TABLE` that sets `CONNECTION`, are denied with `command denied ... for a table set that cannot be determined`. The exceptions are the exempt ACL (`--queryserver-config-acl-exempt-acl`) and a caller with every role in a table group covering every table (`%`).

### `CopySchemaShard` 스키마 템플릿 실행 수정

- 영향 대상: `CopySchemaShard`를 실행하는 환경 및 `--skip-schema-copy`를 설정하지 않은 `Reshard` 스키마 복사 환경
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

수정 전에는 복사된 `SHOW CREATE` 문에 포함된 템플릿 액션(예: 테이블 코멘트) 때문에 Vitess가 대상 프라이머리에서 DBA 사용자로 임의의 SQL을 실행할 수 있었습니다. 이제 복사된 스키마 텍스트는 문자 그대로 처리하며, 데이터베이스 이름을 치환한 뒤 SQL 문이 둘 이상인 정의는 거부합니다.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.
> - `CopySchemaShard`, and so `Reshard`'s schema copy, refuses a copied definition that is more than one statement once the database name is filled in.

### Reshard 스트림 필터에서 추가 템플릿 구문 거부

- 영향 대상: 키스페이스 내 다른 워크플로가 관련된 Reshard 워크플로 마이그레이션
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

Reshard 워크플로 마이그레이션 중 다른 워크플로의 스트림 필터에 `{{`가 있으면 템플릿 액션이 필터를 다시 쓰거나 소스 쓰기가 중단된 뒤 `vtctld`가 충돌할 수 있었습니다. DDL을 실행할 수 있는 사용자는 템플릿 액션을 이용해 Vitess가 대상 프라이머리에서 DBA 사용자로 임의의 SQL을 실행하게 할 수도 있었습니다. 이제 이러한 필터는 거부됩니다. `SwitchTraffic`을 실행하면 쓰기는 소스 샤드에 남고, 이 명령으로 전환된 replica 및 rdonly 읽기는 계속 전환된 상태로 유지됩니다. `--dry-run`은 오류를 보고합니다.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.
> - A Reshard's `SwitchTraffic` fails to switch writes if another workflow in the keyspace has a filter that contains `{{`, for example a moved table whose name contains it. Writes stay on the source shards; replica and rdonly reads that the same command switched stay switched, and `--dry-run` reports the error.

### VDiff `--debug-query`의 `FROM` 절 처리 수정

- 영향 대상: `--debug-query`를 사용하는 VDiff 실행
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

DDL을 실행할 수 있는 사용자가 테이블 주석에 템플릿 액션을 넣으면 Vitess가 목적지 프라이머리에서 DBA 권한으로 임의의 SQL을 실행할 수 있었습니다. 테이블 이름에 `%`가 있으면 `vttablet`이 크래시할 수 있었고, 행이 일치하지 않거나 추가 행이 있는 경우 대상 프라이머리의 `vttablet`도 크래시하거나 기존 VDiff에서 패닉이 발생할 수 있었습니다. 이제 diff 대상 쿼리의 `FROM` 절을 포맷 문자열로 처리하지 않고 그대로 작성하므로, 테이블 이름의 `%`로 인해 설명한 크래시가 발생하지 않습니다.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.

### VDiff 테이블 통계 식별자 이스케이프 수정

- 영향 대상: VDiff 테이블 통계 업데이트
- [GHSA-mmjh-49cg-g5v2](https://github.com/vitessio/vitess/security/advisories/GHSA-mmjh-49cg-g5v2)

이전에는 백틱이 포함된 테이블 이름 때문에 SQL 문이 바뀌어 의도한 테이블을 분석하지 못할 수 있었습니다. 이제 VDiff는 `ANALYZE TABLE` 문에서 데이터베이스와 테이블 식별자를 이스케이프합니다. 일반적인 테이블 이름에는 영향이 없습니다.

> - Fixes [GHSA-mmjh-49cg-g5v2](https://github.com/vitessio/vitess/security/advisories/GHSA-mmjh-49cg-g5v2): SQL injection through table names in the `ANALYZE TABLE` that VDiff runs for `--update-table-stats`. See [#22243](https://github.com/vitessio/vitess/pull/22243).

### VTGate `COM_REGISTER_SLAVE` 패킷 길이 검사 추가

- 영향 대상: VTGate MySQL 복제 등록
- [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2)

호스트 이름, 사용자 이름 또는 비밀번호의 길이가 `COM_REGISTER_SLAVE` 패킷 범위를 넘으면 이전에는 범위를 벗어난 읽기가 발생하거나 연결이 닫히는 패닉이 발생할 수 있었습니다. 이제 파서는 해당 길이를 패킷 길이와 비교해 검사합니다.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### VDiff 및 Reshard의 `stop_pos` SQL 인젝션 수정

- 영향 대상: 소스 태블릿의 복제 위치에서 `stop_pos`를 업데이트하는 VDiff 워크플로와 `Reshard` 작업
- [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf)

보고된 위치에 따옴표가 있으면 이스케이프되지 않은 업데이트가 깨져 SQL 인젝션이 가능했습니다. 이제 위치를 이스케이프된 SQL 문자열 리터럴로 기록하며, 일반적인 위치에서는 문장이 변경되지 않습니다.

> - Fixes [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf): SQL injection through a replication position from a source tablet in the `stop_pos` update that VDiff runs and in the update that `Reshard` runs when switching writes. See [#22250](https://github.com/vitessio/vitess/pull/22250).

### VDiff 및 Reshard 복제 위치 SQL 인젝션 수정

- 영향 대상: VDiff v2와 레거시 VDiff, Reshard 쓰기 전환
- [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf)

소스 태블릿의 복제 위치로 인해 VDiff의 `stop_pos` 업데이트와 쓰기 전환 중 Reshard의 업데이트에서 SQL 인젝션이 발생할 수 있었습니다. 이제 VDiff는 `stop_pos`를 업데이트하기 전에 소스 스냅샷 위치를 파싱합니다. 파싱할 수 없는 위치면 대상 스트림을 변경하지 않고 실패하며, 파싱할 수 있는 위치는 다시 인코딩해 저장합니다.

> - Fixes [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf): SQL injection through a replication position from a source tablet in the `stop_pos` update that VDiff runs and in the update that `Reshard` runs when switching writes. See [#22250](https://github.com/vitessio/vitess/pull/22250).

## 호환성 변경 (1)

### ZooKeeper `digest` 인증 파일에 완전한 자격 증명 필요

- 영향 대상: ZooKeeper `digest` 인증 파일
- 필요 조치: `digest` 인증 파일에 사용자와 암호 모두 필요하며, 형식은 `digest:<user>:<password>`입니다.

끝에 붙은 CR 문자를 제거하므로, CRLF로 끝나는 파일은 `zkCli.sh`에서 `addauth digest <user>:<password>`를 실행했을 때와 동일한 아이덴티티를 생성합니다.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.

## 중요 수정 (2)

### VTGate prepared statement 연결 종료 수정

- 영향 대상: VTGate의 MySQL prepared statement 처리

잘못된 `COM_STMT_RESET` 패킷이 도착했거나 statement ID를 알 수 없으면, 서버는 오류를 보낸 뒤 nil `PrepareData` 역참조로 연결을 닫았습니다. 이제 오류를 한 번만 보내고 연결을 열린 상태로 유지합니다.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### 알 수 없는 `COM_SET_OPTION` 작업에 오류만 반환

- 영향 대상: VTGate MySQL의 `COM_SET_OPTION` 처리

클라이언트가 알 수 없는 작업으로 `COM_SET_OPTION`을 보내면, 서버는 오류를 반환한 뒤 OK도 반환해 클라이언트의 응답 처리가 한 건 어긋났습니다.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

## 기능·개선 (2)

- ZooKeeper 토폴로지 플래그 추가 (사용 조건: 관련 `--topo-zk-*` 플래그; `vtctldclient`에는 `--server internal`도 필요)
- ZooKeeper 인증 및 TLS 플래그를 `vtcombo`에 전달하는 `vttestserver` (사용 조건: 외부 토폴로지 사용)

## 기타 (2)

- 레거시 `vtctl`의 소스 표현식 템플릿 치환 중단
- 알 수 없는 명령 로그에서 패킷 바이트 제외

---

정리 내용은 AI가 작성하므로 틀릴 수 있으며, 보증 없이 제공합니다.
