Skip to content

zip: fix command injection and buffer overflow - #553629

Merged
xanderio merged 4 commits into
NixOS:stagingfrom
blitz:blitz/security/zip
Aug 18, 2026
Merged

xanderio merged 4 commits into
NixOS:stagingfrom
blitz:blitz/security/zip

Conversation

@blitz

@blitz blitz commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The patches are from Debian. I don't see a good way to fetch them directly so I added them to the repo.

Fixes: #552641
Fixes: CVE-2018-13410

Regarding CVE-2018-13410, this is marked as disputed upstream, but the buffer overflow is real and you can see it with the (unpatched) zip:

$ nix-build -A pkgs.zip
/nix/store/nkvg1zwy7k1x44k4jlr58z9xkkgwcgcv-zip-3.0
$ ./result/bin/zip a.zip /etc/hosts -T -TT "ls"
updating: etc/hosts (deflated 39%)
*** buffer overflow detected ***: terminated


zip error: Interrupted (aborting)
free(): double free detected in tcache 2

Things done

@blitz blitz added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Aug 17, 2026
@blitz
blitz force-pushed the blitz/security/zip branch from 6c4c451 to 07986ff Compare August 17, 2026 11:58
@blitz blitz changed the title Blitz/security/zip zip: fix command injection and buffer overflow Aug 17, 2026
@nixpkgs-ci
nixpkgs-ci Bot requested a review from RossComputerGuy August 17, 2026 12:03
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Aug 17, 2026
@blitz blitz added the backport staging-26.05 Backport PR automatically label Aug 17, 2026
@blitz
blitz force-pushed the blitz/security/zip branch from 07986ff to dbaf8c9 Compare August 17, 2026 12:44
@blitz
blitz force-pushed the blitz/security/zip branch from dbaf8c9 to dd9b9f6 Compare August 17, 2026 13:50
@blitz

blitz commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor Author

I think I fixed the CI issues, but Github is having a bad day...

@RossComputerGuy

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 553629 --package unzip
Commit: dd9b9f6c0b6d8f4b0a9de973958689169dd57c70


aarch64-linux

✅ 1 package built:
  • unzip

@RossComputerGuy RossComputerGuy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved automatically following the successful run of nixpkgs-review.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". labels Aug 17, 2026
@blitz

blitz commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Can someone poke the CI jobs? They failed during the latest Github outage.

@thunze thunze closed this Aug 17, 2026
@thunze thunze reopened this Aug 17, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. label Aug 17, 2026
@xanderio
xanderio added this pull request to the merge queue Aug 18, 2026
Merged via the queue into NixOS:staging with commit f6c10bf Aug 18, 2026
35 of 38 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for staging-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. backport staging-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants