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 #21520

Conversation

hc-github-team-consul-core
Copy link
Contributor

Backport

This PR is auto-generated from #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

Copy link

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@DanStough DanStough merged commit ad6931c into release/1.19.x Jul 5, 2024
83 checks passed
@DanStough DanStough deleted the backport/dans/NET-9159/panic-on-fsm-error-two/amazingly-full-earwig branch July 5, 2024 19:18
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

Successfully merging this pull request may close these issues.

3 participants