RUSTSEC-2026-0418: libz-sys build script leaks environment variables in the build directory
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
The issue describes a security advisory for libz-sys, but does not identify a change needed in numtracker or any affected files or tests. Start by checking how numtracker depends on libz-sys and whether the affected versions are present in its dependency tree. Done means confirming whether this repository needs a dependency update or other mitigation; the issue provides no repository-specific acceptance criteria.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
libz-sys build script leaks environment variables in the build directory
| Details | |
|---|---|
| Package | libz-sys |
| Version | 1.1.29 |
| URL | https://github.com/rust-lang/libz-sys/pull/280 |
| Date | 2026-10-28 |
| Patched versions | >=1.1.31 |
| Unaffected versions | <1.0.21 |
The build script of libz-sys version <= 1.1.30 prints the full environment
of the build, including any secrets it contains, to its stdout when compiled
with [email protected] or later on a Unix host. This affects any build that depends on
libz-sys. Cargo saves build script stdout under target/, so the values end
up in anything that stores or shares the target/ directory, such as CI caches.
This is similar to the Miri issue.
Details
To decide whether to link against a system zlib, the libz-sys build script
compiles a small test program with a compiler command from cc and logs it
with:
println!("running {:?}", cmd);
On Unix, Debug impl for std::process::Command prints every environment
variable explicitly set on the command. Before [email protected], its
Tool::to_command() set only a few compiler-specific variables. Starting with
[email protected] (released 2026-10-03), Tool::to_command() clears the environment
and sets every variable explicitly.
Cargo parses build script stdout for cargo: directives, and stores the full
output in the build directory. It also prints it with -vv.
The probe runs for a default libz-sys build, including when pkg-config finds
zlib, unless one of these applies:
- the target is Windows, Android, Haiku or OpenHarmony
- static linking is requested via the
staticfeature orLIBZ_SYS_STATIC=1 - the
zlib-ngfeatures are enabled withoutstock-zlib
Mitigations
Fixed in [email protected], which no longer logs the probe command.
If you cannot upgrade, here are some workarounds:
- Build with
LIBZ_SYS_STATIC=1or thestaticfeature, which skips the probe. - Pin
ccto a release before 1.6.0 (cargo update cc --precise <version>).
Note that upgrading libz-sys does not remove values already written. If an
affected build already ran with secrets in its environment, clear CI caches and
stored artifacts containing its
target/build directory,
and consider rotating those secrets.
See advisory page for additional details.
- Vorherrschende Sprache
- Rust
- Sterne
- 2
- Forks
- 2
- Ø Merge
- 13 Std. 13 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/numtracker
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
DiamondLightSource/numtracker#309 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
DiamondLightSource/numtracker#278 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 20/100
DiamondLightSource/numtracker#326 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
DiamondLightSource/numtracker#325 ·
-
RUSTSEC-2026-0387: Multiple timing variability issues in operations intended to be constant-timeOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 1/100
DiamondLightSource/numtracker#324 ·
Alle Issues in DiamondLightSource/numtracker
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
max-sixty/worktrunk#4727 · 7 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
carrick-sh/carrick#1859 ·
Maintainer antworten meist innerhalb von 1 Tag
-
crate: spate-kafka documentation priority: medium
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag