Skip to content

Restore: make loading compressor commands from MANIFEST opt-in#19460

Merged
timvaillancourt merged 7 commits intovitessio:mainfrom
timvaillancourt:external-decompressor-allow-manifest
Feb 24, 2026
Merged

Restore: make loading compressor commands from MANIFEST opt-in#19460
timvaillancourt merged 7 commits intovitessio:mainfrom
timvaillancourt:external-decompressor-allow-manifest

Conversation

@timvaillancourt
Copy link
Copy Markdown
Contributor

@timvaillancourt timvaillancourt commented Feb 24, 2026

Description

This PR addresses a security concern with external compressors at restore-time by requiring the user to opt-in to the potentially-dangerous behaviour of trusting the backup MANIFEST file as a source of compressor configuration

To opt-in to the pre-v24 behaviour of trusting the MANIFEST, add the new flag to VTTablet:

--external-decompressor-use-manifest
allows the decompressor command stored in the backup manifest to be used at restore time. Enabling this is a security risk: an attacker with write access to the backup storage could modify the manifest to execute arbitrary commands on the tablet as the Vitess user. NOT RECOMMENDED.

From v24 an on, we won't trust the MANIFEST for compressor configuration by default 🔒

This attack vector is possible when no --external-decompressor flag is provided to the tablet, but the MANIFEST contains a configuration for an external compressor

In a follow-up feature request, a longer-term solution for securing external compressors will be proposed and implemented. This PR is a short term fix so that default-users are not at risk, and users aware of the risks can decide if they'd like this behaviour

Related Issue(s)

Resolves: #19459

Partially-resolves: GHSA-8g8j-r87h-p36x

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

AI Disclosure

Claude Code w/Opus 4.6 wrote the unit tests 🙇

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@vitess-bot
Copy link
Copy Markdown
Contributor

vitess-bot bot commented Feb 24, 2026

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsWebsiteDocsUpdate What it says NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Feb 24, 2026
@github-actions github-actions bot added this to the v24.0.0 milestone Feb 24, 2026
@timvaillancourt timvaillancourt changed the title WIP Restore: make loading compressor commands from MANIFEST opt-in Feb 24, 2026
@timvaillancourt timvaillancourt added Type: Bug Component: Backup and Restore Type: Security and removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Feb 24, 2026
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
…-allow-manifest

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@promptless
Copy link
Copy Markdown
Contributor

promptless bot commented Feb 24, 2026

📝 Documentation updates detected!

New suggestion: Document external-decompressor-use-manifest flag for backup/restore security


Tip: Tell your friends working on non-commercial open-source projects to apply for free Promptless access at promptless.ai/oss ❤️

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.74%. Comparing base (70c7a72) to head (3f1473f).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
go/vt/mysqlctl/compression.go 85.71% 1 Missing ⚠️
go/vt/mysqlctl/xtrabackupengine.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (70c7a72) and HEAD (3f1473f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (70c7a72) HEAD (3f1473f)
1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #19460       +/-   ##
===========================================
- Coverage   69.67%   48.74%   -20.94%     
===========================================
  Files        1614       46     -1568     
  Lines      216793     6988   -209805     
===========================================
- Hits       151044     3406   -147638     
+ Misses      65749     3582    -62167     
Flag Coverage Δ
partial 48.74% <77.77%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt self-assigned this Feb 24, 2026
Copy link
Copy Markdown
Collaborator

@mhamza15 mhamza15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt merged commit 4c01732 into vitessio:main Feb 24, 2026
111 of 112 checks passed
@timvaillancourt timvaillancourt deleted the external-decompressor-allow-manifest branch February 24, 2026 19:21
@timvaillancourt timvaillancourt added Backport to: release-22.0 Needs to be backport to release-22.0 Backport to: release-23.0 Needs to be backport to release-23.0 labels Feb 24, 2026
vitess-bot bot added a commit that referenced this pull request Feb 24, 2026
)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
timvaillancourt pushed a commit that referenced this pull request Feb 25, 2026
…ST` opt-in (#19460) (#19474)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
timvaillancourt pushed a commit that referenced this pull request Feb 25, 2026
…ST` opt-in (#19460) (#19474)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
timvaillancourt added a commit that referenced this pull request Feb 25, 2026
timvaillancourt pushed a commit that referenced this pull request Feb 25, 2026
…ST` opt-in (#19460) (#19474)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
timvaillancourt added a commit that referenced this pull request Feb 25, 2026
… `MANIFEST` opt-in (#19460) (#19474)"

This reverts commit 57d7cea.

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
timvaillancourt added a commit that referenced this pull request Feb 25, 2026
)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
timvaillancourt added a commit that referenced this pull request Feb 25, 2026
…ST` opt-in (#19460) (#19473)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
timvaillancourt added a commit to timvaillancourt/vitess that referenced this pull request Feb 26, 2026
…#19427

- Breaking change: external decompressor no longer read from backup MANIFEST by default
- VTOrc: ordered recovery execution and semi-sync rollout improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
timvaillancourt added a commit that referenced this pull request Feb 26, 2026
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
timvaillancourt pushed a commit that referenced this pull request Feb 27, 2026
…ST` opt-in (#19460) (#19474)

Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Hamza <mhamza@fastmail.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: backup restore trusts decompressor in MANIFEST by default

3 participants