Skip to content

A TOCTOU race in GetObjectWithGeneration (fs backend) #2136

Description

@misha-drozd

GetObjectWithGeneration may return the data from the wrong generation:

  1. GetObjectWithGeneration takes a lock, retrieves object metadata, releases the lock.
  2. Here another call might create new generation as no lock is held.
  3. GetObjectWithGeneration checks the actual and expected generation
  4. GetObjectWithGeneration opens the file (that was replaced on step 2) and returns it.

Originally found in #2117

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions