Skip to content

Fix xz download URL — tukaani.org 404s post-CVE-2024-3094 hosting shift - #330

Merged
dwoz merged 1 commit into
saltstack:mainfrom
dwoz:dwoz/fix/xz-download-url-github-releases
Sep 30, 2026
Merged

dwoz merged 1 commit into
saltstack:mainfrom
dwoz:dwoz/fix/xz-download-url-github-releases

Conversation

@dwoz

@dwoz dwoz commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

After the March 2024 xz-utils supply-chain backdoor (CVE-2024-3094), the xz project moved release tarball hosting from Lasse Collin's tukaani.org infrastructure to the community-maintained github.com/tukaani-project/xz repository. Tarball paths under tukaani.org/xz/ now 404 (the listing page at https://tukaani.org/xz/ remains up but its anchor hrefs point directly at GitHub releases), which broke the Auto-Update Versions workflow when it tried to fetch xz-5.8.4:

Downloading http://tukaani.org/xz/xz-5.8.4.tar.gz...
HTTP Error 404: Not Found
relenv.common.RelenvException: Error fetching url ...

Confirmed via curl:
http://tukaani.org/xz/xz-5.8.4.tar.gz -> 301 -> https
https://tukaani.org/xz/xz-5.8.4.tar.gz -> 404
https://github.com/tukaani-project/xz/releases/
download/v5.8.4/xz-5.8.4.tar.gz -> 302 -> 200

Switch every hardcoded xz download URL to the canonical GitHub-releases template. Version detection (which scrapes the tukaani.org listing page) still works and is left alone. The CPE identifier
cpe:2.3:a:tukaani:xz:... in build/windows.py is a vulnerability-DB name, not a URL, and is also left alone.

Files touched:

  • relenv/python-versions.json (5.8.2, 5.8.3 URL templates)
  • relenv/pyversions.py (Auto-Update Versions download +
    stored template for new releases)
  • relenv/build/linux.py (fallback URL when JSON lookup fails)
  • relenv/build/darwin.py (fallback URL when JSON lookup fails)

Impact: the Auto-Update Versions workflow can now discover and pin new xz releases; existing 5.8.2/5.8.3 pins in python-versions.json also resolve again if a fresh rebuild pulls the tarball. No version bump is performed by this commit — that is the downstream job of the automated workflow once this URL fix lands.

@dwoz
dwoz force-pushed the dwoz/fix/xz-download-url-github-releases branch from de11d2c to b372f6e Compare September 30, 2026 01:36
…VE-2024-3094

After the March 2024 xz-utils supply-chain backdoor (CVE-2024-3094), the
xz project moved release hosting and authoritative release metadata from
Lasse Collin's tukaani.org infrastructure to the community-maintained
github.com/tukaani-project/xz repository. Tarball paths under
`tukaani.org/xz/` now 404 (the listing page at `https://tukaani.org/xz/`
remains up but its anchor hrefs point directly at GitHub releases), which
broke the Auto-Update Versions workflow when it tried to fetch xz-5.8.4:

    Downloading http://tukaani.org/xz/xz-5.8.4.tar.gz...
    HTTP Error 404: Not Found
    relenv.common.RelenvException: Error fetching url ...

Confirmed via curl:
    http://tukaani.org/xz/xz-5.8.4.tar.gz              -> 301 -> https
    https://tukaani.org/xz/xz-5.8.4.tar.gz             -> 404
    https://github.com/tukaani-project/xz/releases/
        download/v5.8.4/xz-5.8.4.tar.gz                -> 302 -> 200

This commit makes two related changes:

1. Switch every hardcoded xz download URL to the canonical GitHub-releases
   template `https://github.com/tukaani-project/xz/releases/download/
   v{version}/xz-{version}.tar.gz`.

2. Switch xz version *discovery* off tukaani.org too. Even though
   `https://tukaani.org/xz/` still returns 200 today, we shouldn't rely
   on that host as authoritative post-CVE. `detect_xz_versions()` now
   queries the tukaani-project Releases API
   (`https://api.github.com/repos/tukaani-project/xz/releases`), which
   is what tukaani.org itself now links to; drafts and prereleases
   (e.g. `v5.7.2beta`) are filtered.

The CPE identifier `cpe:2.3:a:tukaani:xz:...` in build/windows.py is a
vulnerability-DB name, not a URL, and is left alone.

Files touched:
  - relenv/python-versions.json     (5.8.2, 5.8.3 URL templates)
  - relenv/pyversions.py            (download URL for Auto-Update Versions,
                                     stored template for new releases,
                                     detect_xz_versions -> GitHub API)
  - relenv/build/linux.py           (fallback URL when JSON lookup fails)
  - relenv/build/darwin.py          (fallback URL when JSON lookup fails)
  - tests/test_pyversions_runtime.py (mock updated to GitHub API JSON,
                                      asserts endpoint + prerelease/draft
                                      filtering)

Impact: `relenv versions --check-deps` now reports
`XZ 5.8.3 -> 5.8.4 (update available)` correctly, and
`relenv versions --update-deps` can actually fetch the tarball. No
version pin is bumped by this commit — that is the downstream job of
the Auto-Update Versions workflow once this fix lands.
@dwoz
dwoz force-pushed the dwoz/fix/xz-download-url-github-releases branch from b372f6e to 8ac47c1 Compare September 30, 2026 01:49
@dwoz
dwoz merged commit 6e8808c into saltstack:main Sep 30, 2026
7 of 31 checks passed
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