Skip to content

Record special bits in store identity - #46

Merged
jhuntwork merged 1 commit into
mainfrom
store-identity-v3-fresh
Aug 23, 2026
Merged

Record special bits in store identity#46
jhuntwork merged 1 commit into
mainfrom
store-identity-v3-fresh

Conversation

@jhuntwork

@jhuntwork jhuntwork commented Aug 22, 2026

Copy link
Copy Markdown
Owner

New packages use manifest.v3 and a domain-separated v3 content hash.

Before v3, Mere preserved setuid, setgid, and sticky bits when packaging and extracting files, but did not include them in the content hash. That created a semantic hole: two packages could share the same store identity while behaving differently.

For example:

  • A normal executable and a setuid executable could hash identically.
  • A shared directory could gain or lose setgid behavior without changing identity.
  • A sticky shared directory such as /tmp could hash like an ordinary writable directory.
  • Verification could report success despite those meaningful permission bits drifting.

V3 closes that gap by including the three special bits for regular files and directories in the hash. It deliberately continues excluding ownership and ordinary read/write permissions because those are changed by installation context and hardening. Symlink modes remain excluded because they are not meaningful on Linux.

@jhuntwork
jhuntwork merged commit b8726de into main Aug 23, 2026
2 checks passed
@jhuntwork
jhuntwork deleted the store-identity-v3-fresh branch August 23, 2026 00:06
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.

1 participant