Skip to content

Source tarball ownership normalization breaks GitHub release signature verification #5679

Closed
dotnet/dotnet
#10917

Description

@mthalman

Description

The detached signatures attached to dotnet/dotnet releases do not verify against GitHub’s automatically generated source tarballs.

Related report: dotnet/dotnet#10452

Reproduction

version=10.0.114

curl -fLO "https://github.com/dotnet/dotnet/archive/refs/tags/v$version.tar.gz"
curl -fLO "https://github.com/dotnet/dotnet/releases/download/v$version/dotnet-$version.tar.gz.sig"

gpg --verify "dotnet-$version.tar.gz.sig" "v$version.tar.gz"

With the [release public key](https://dot.net/release-key-2023) imported, this reports:

gpg: BAD signature from "onnxcoredev@microsoft.com" [unknown]

Root cause

The build-generated source archives normalize tar ownership to UID/GID 2001:2001 and clear owner/group names, while GitHub-generated archives use 0:0 and root:root. The signatures cover the build-generated archives, not the different bytes downloaded from GitHub.

Activity

  1. mmitche commented on Oct 26, 2026

    @mmitche
    Member

    Oh that is a pain...

  2. added
    area-infra
    and removed on Oct 29, 2026
  3. moved this from Backlog to Servicing in .NET Source Buildon Oct 29, 2026
  4. self-assigned this
    on Oct 29, 2026
  5. corngood commented on Nov 10, 2026

    @corngood

    I see the workaround instructions are still there in the latest release, but I don't see a reliable way to get the correct download URL, e.g. in https://api.github.com/repos/dotnet/dotnet/releases. Can we come up with a way to do that? The servicing version suffix makes it impossible to guess a URL.

    Also, I can't seem to find any public info on why this was done. The closest so far is:

    dotnet/dotnet@d374a49

    Bug fix: ensures all source-build tarballs have consistent, normalized file ownership (UID/GID 2001) for reproducibility and security compliance.

    why though?

  6. omajid commented on Nov 10, 2026

    @omajid
    Member

    Can we come up with a way to do that? The servicing version suffix makes it impossible to guess a URL

    You can fetch the release.json programmatically already, right? It contains officialBuildId in YYYYMMDD.r, the servicing version is:

    (1000 × (YYYY mod 100) + 50 × MM + DD).(100 + r)

  7. omajid commented on Nov 10, 2026

    @omajid
    Member

    @mthalman can we put the servicing version directly in the release.json file?

  8. corngood commented on Nov 11, 2026

    @corngood

    (1000 × (YYYY mod 100) + 50 × MM + DD).(100 + r)

    Thanks for that. Yeah, we're already fetching the release.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-infra

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions