Skip to content

security: handle-based destination checks against junction races #81

Closed

Description

@nextestudios

Summary

Replace path-based reparse checks in extraction and file operations with handle-based verification (FILE_FLAG_OPEN_REPARSE_POINT) close to each write.

Motivation

Documented limitation: a same-privilege process could swap a folder for a junction between revalidation and the final move.

Requirements

  • Open parent directories by handle, verify they are not reparse points, create/move relative to verified handles where possible.
  • Document the remaining limits in docs/security-model.md.

Controller UX

No UX change.

Technical Notes

DestinationGuard and the new operation engine.

Acceptance Criteria

  • Adversarial Windows integration test cannot redirect writes via a racing junction swap.

Testing

Unit tests for new branches and for every bug reproduced before a fix (no trivial variations, see AGENTS.md). Adversarial Windows integration tests.

Dependencies

  • None

Priority: medium · Milestone: 9 · 1.0 Readiness

Activity

  1. added
    priority: medium
    type: security
    area: filesystem
    area: archives
    on Sep 27, 2026
  2. added
    moscow: must
    and removed
    priority: medium
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: archivesarea: filesystemmoscow: musttype: security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions