Skip to content

Update zip to 9.6.1 - #59

Open
IoSonoPiero wants to merge 1 commit into
image-rs:mainfrom
IoSonoPiero:zip-9
Open

IoSonoPiero wants to merge 1 commit into
image-rs:mainfrom
IoSonoPiero:zip-9

Conversation

@IoSonoPiero

Copy link
Copy Markdown

Related to #56.

I use image-extras in my image viewer, and cargo deny reports seven advisories for zip 5: RUSTSEC-2026-0367, RUSTSEC-2026-0368, RUSTSEC-2026-0369, RUSTSEC-2026-0429, RUSTSEC-2026-0545, RUSTSEC-2026-0547 and RUSTSEC-2026-0548. They are fixed in zip 9 (0548 in 9.0.5). As said in #56, the ORA decoder does not extract archives, so I think image-extras is not really affected. But the cargo-deny job of this repository fails because of them (for example in #58), and every user of the ora feature has to ignore them in their own deny.toml. The 5.x backport was merged in zip2 but it is not released yet.

This PR only changes the zip version in Cargo.toml, from 5.1.1 to 9.6.1. The code in src/ora.rs builds without changes, the deflate feature is the same, and zip 9.6.1 needs Rust 1.88, so the MSRV stays 1.89.

I checked:

  • cargo test and cargo test --all-features pass (also the ORA reference test)
  • cargo clippy --all-targets --all-features -- -D warnings is clean (stable)
  • cargo fmt --check and cargo deny check are ok

@mstoeckl mstoeckl left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is reasonable in principle, the zip crate released a few more security issues today, see https://github.com/zip-rs/zip2/security?page=1 and https://rustsec.org/packages/zip.html. None are particularly relevant for image-extras (the openraster decoding doesn't promise particularly tight adherence to the memory limits or even bounded runtime), and unless zip2 somehow gets an RCE vulnerability triggered by just reading a file, I don't expect it to be urgent for image-extras.

Because I expect to see a number of other security advisories related to archive extraction in zip in coming months, it may prove easier for whoever makes the next image-extras release to also bump the zip crate to whatever the latest version is. Merging this now would also be OK by me, just expect it to be temporary relief.

Edit: oops, the security issues today were the ones fixed in 9.6.1, RUSTSEC has a bit of time delay. But the likelihood of further issues remains.

@IoSonoPiero

Copy link
Copy Markdown
Author

Thanks for the review and the context. No hurry from my side: merge it whenever it fits, or bump zip with the next release if that's easier.

Piero

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.

2 participants