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

CSI: fix potential state store corruptions #16256

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Feb 24, 2023

The CSIVolume struct has references to allocations that are "denormalized"; we don't store them on the CSIVolume struct but hydrate them on read. Tests detecting potential state store corruptions (ref #16257) found two locations where we're not copying the volume before denormalizing:

  • When garbage collecting CSI volume claims.
  • When checking if it's safe to force-deregister the volume.

There are no known user-visible problems associated with these bugs but both have the potential of mutating volume claims outside of a FSM transaction. This changeset also cleans up state mutations in some CSI tests so as to avoid having working tests cover up potential future bugs.

The `CSIVolume` struct has references to allocations that are "denormalized"; we
don't store them on the `CSIVolume` struct but hydrate them on read. Tests
detecting potential state store corruptions found two locations where we're not
copying the volume before denormalizing:

* When garbage collecting CSI volume claims.
* When checking if it's safe to force-deregister the volume.

There are no known user-visible problems associated with these bugs but both
have the potential of mutating volume claims outside of a FSM transaction. This
changeset also cleans up state mutations in some CSI tests so as to avoid having
working tests cover up potential future bugs.
@tgross tgross marked this pull request as ready for review February 24, 2023 20:25
@tgross tgross requested review from lgfa29 and jrasell February 24, 2023 20:26
@tgross tgross modified the milestones: 1.5.x, 1.5.0 Feb 24, 2023
@tgross tgross added backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line labels Feb 24, 2023
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line theme/storage type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants