update packages to zip v9 to address RUSTSEC-2026-{0367,0368,0369} #47
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rust/backlog#47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three RUSTSEC advisories have been published for the
zipcrate recently:All three have only been addressed in zip
>=9.0.0and not in older versions. The advisories don't contain information which versions are affected, only that>=9.0.0contains the necessary fixes. As such it's only safe to assume that all versions<9.0.0are affected.Affected applications (zip v8):
zipis only a test dep. forastral_async_zip;python-uv-buildis not built withzipzipis only a test dep. forastral_async_zip;uvis not built withzip(All of the above have been updated to
zipv9.)Affected applications (zip v2):
(The above has been updated to
zipv9.)Affected applications (zip v0.6):
Bundled dependencies:
This is probably going to come after the rustls and webpki updates have settled out, just for practical and capacity reasons. Updating packages that already use v8 should be easy, and I would prefer to coordinate all of these simultaneously and avoid a v8 compat package.
Neither
uvnorpython-uv-buildis actually affected, becausezipis just a test dependency forastral_async_zip.Looking at https://github.com/PyO3/maturin/pull/3334, this update is going to be a bit fussier than I anticipated. Maturin upstream claims to have analyzed their direct and indirect uses and not to be affected.
I tried to help unblock maturin upstream by offering a patch for https://github.com/Jake-Shadle/xwin (a Windows-only dependency that we don’t need in Fedora), but I encountered nontrivial API changes around archive member names. For example,
ZipFile::name()returned&strin v8, and in v9 it returnsZipResult<Cow<'_, str>>.(Despite the exhaustive enumeration of tiny, low-level changes in https://github.com/zip-rs/zip2/blob/v9.1.2/CHANGELOG.md, and the indication of several of them as [BREAKING],
zipupstream doesn’t seem to have mentioned this change at all. Nor do they offer a high-level overview of significant changes or a migration guide when issuing a new major release. No wonder the ecosystem is all over the place with oldzipversions.)I’ll take a look at the packages that we actually have in Fedora as I have a chance, but it feels like this is likely to be a
rust-zip8compat package and wait for upstreams stituation.I confirmed that
rust-python-pkginfowould also need some non-obvious changes to deal with fallible filename accesses. Glancing at thezipsource, this seems most likely to happen due to the filename bytes not conforming to an expected string encoding. Deciding how to deal with this in a way consistent with a library or application’s goals and existing error handling strategy is not an easy thing to do without some upstream design work.This will need updates for the
zstdandconstant_time_eqcrates, presumably also with compat packages.@decathorpe Would you be available (at some point) to handle the
zstd/zstd-safe/zstd-sysupdates needed for this? I’m sure I could work through them given enough time, but they’re pretty messy packages to work on. I think we’ll need compat packages forzstdandzstd-safe, but I would love to be wrong. I haven’t proven that we can’t patch this to work with the previouszstd, but given the amount of code churn in the same commits asgithub.com/zip-rs/zip2@700bf5d61dandgithub.com/zip-rs/zip2@b5326b2b42, I would be shocked if that were possible.Yes, I had planned to work on the zstd crate updates soon(-ish). I agree that compat packages for zstd-safe and zstd will likely be necessary, if hopefully only for some limited time.