Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of fix(txn): validate verbs into release/1.19.x #284

Open
dhiaayachi opened this issue Sep 25, 2024 · 0 comments
Open

Backport of fix(txn): validate verbs into release/1.19.x #284

dhiaayachi opened this issue Sep 25, 2024 · 0 comments

Comments

@dhiaayachi
Copy link
Owner

Backport

This PR is auto-generated from hashicorp#21519 to be assessed for backporting due to the inclusion of the label backport/1.19.

The below text is copied from the body of the original PR.


Description

There are two entry points into the state store:

  1. Through RPCs
  2. Indirectly, through Raft FSM Applies

In the latter case, errors are not acknowledged because the log must be processed by Consul. It is possible in this case that if a future version of Consul is using syntax, such as Txn API Verbs, that the current version does not understand, it will fail to apply successfully, causing a divergence with other servers.

This PR makes two types of changes:

  1. Panics are introduced for unknown verb types to prevent state store divergence
  2. Validation at the endpoint layer to make sure there is feedback to user for invalid verbs and this cannot be used for a DOS attack.

Overview of commits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant