Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "unzip: CVE-2019-13232" #65393

Merged
merged 1 commit into from Jul 26, 2019

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Jul 25, 2019

This reverts commit 0238946.

This patch broke a number of legitimate zips in the wild, including but
not limited to most luarocks and a number of gradle-produced JARs.
The CVE is not high severity and it breaks too much.

Note that I'm sending this directly to master despite the build impact.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

#64909
#64910
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931895

cc @mmahut @vcunat @volth

This reverts commit 0238946.

This patch broke a number of legitimate zips in the wild, including but
not limited to most luarocks and a number of gradle-produced JARs.
@mmahut
Copy link
Member

mmahut commented Jul 25, 2019

I think is up to the security team to decide if we want to carry the effort of fixing the regressions or if we decide to drop this CVE from NixOS all together.

cc @grahamc @fpletz @domenkozar

@grahamc
Copy link
Member

grahamc commented Jul 25, 2019

I'm +1 on the revert, and following Debian's lead on when they have an updated patch.

vcunat added a commit that referenced this pull request Jul 25, 2019
@vcunat
Copy link
Member

vcunat commented Jul 25, 2019

staging-next with this is being evaluated on Hydra ATM; it's otherwise idle anyway.

@samueldr
Copy link
Member

Thanks to @delroth, here's the eval link https://hydra.nixos.org/eval/1532256?full=1#tabs-now-fail

Now, a bunch of those new failures are from depending on things now failing. Let's filter these out (using the browser's dev console).

$('img.build-status[alt^="Dependency"]').parent().parent().remove()
$("#tabs-now-fail .table tr").length

297, this includes the table header, 296 newly failing builds. Of those, only a handful are not related to the zip bomb detection, the overwhelming majority is. In addition, I think it's likely that other failures from the list would have failed the check if it wasn't that they depended on a now failing build.

+1 for reverting.

@delroth
Copy link
Contributor

delroth commented Jul 26, 2019

From a security standpoint it makes no sense to keep this patch in. The only thing it will do is push people to keep their OS out of date because they literally can't install anything that depends on Lua (or pick your favorite cluster of breakage) otherwise.

@dtzWill
Copy link
Member

dtzWill commented Jul 26, 2019

Just scanned through comments and since it seems this hasn't been mentioned:

The CVE patch we're using explicitly mentions it requires another patch in order to work correctly.

Without this patch I'm observing incorrect flagging of zip's as "zip bombs", with the mentioned prereq it works properly. So I vote we go in that direction?

@dtzWill
Copy link
Member

dtzWill commented Jul 26, 2019

dtzWill@93a8985 is how I did it, FWIW.

@mmahut
Copy link
Member

mmahut commented Jul 26, 2019

From a security standpoint it makes no sense to keep this patch in. The only thing it will do is push people to keep their OS out of date because they literally can't install anything that depends on Lua (or pick your favorite cluster of breakage) otherwise.

Depends, if these are really broken/vulnerable zip files, it makes sense to put in the work and fix it for good. Other distributions will pick it up sooner or later too.

dtzWill@93a8985 is how I did it, FWIW.

Oh, interesting, maybe this makes sense instead of the whole revert? I did not try this one yet, but looks like debian has it in and see some legit failures too. For example, the jar issues are legit (as per they are using broken archives), as pointed out https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931895#73

@vcunat
Copy link
Member

vcunat commented Jul 26, 2019

Hydra managed to do most of the rebuilds already and basically completed x86_64-linux ones, so for now I would still merge this to master (as it's a faster solution).

I still think we don't need to hurry that much with fixing this CVE in master, so we can e.g. spin a separate Hydra jobset to look at our regressions or something, though it seems likely that with dtzWill@93a8985 there will be very few of them (and we can add the Firefox-specific commit, too).

@vcunat vcunat merged commit eaafd84 into NixOS:master Jul 26, 2019
@thorstenweber83 thorstenweber83 mentioned this pull request Oct 19, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants