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

libmodsecurity bump version and fix CVE-2020-15598 #98005

Closed
wants to merge 2 commits into from

Conversation

tnias
Copy link
Contributor

@tnias tnias commented Sep 14, 2020

Motivation for this change

I am using this software and there are patches.

There is a dispute whether this is a vuln or not:

Things done

Bumped the version. Applied the patch. Rebuilt the server. The website is still working and modsecurity still blocks shady requests.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

CC maintainer: @Izorkin

@ajs124
Copy link
Member

ajs124 commented Sep 15, 2020

If upstream doesn't consider it an issue where does this patch come from and what exactly does it do?

@tnias
Copy link
Contributor Author

tnias commented Sep 15, 2020

Patch was taken from the corerulesset blog post and the PR should reproduce the recommended build instructions.

[...] Since Trustwave does not want to release a new version, we are providing you with a backported patch for the vanilla ModSecurity 3.0.4. Please note that this is the patch that the Debian packaging team as well as NGINX will be using for their security updates.

cve-2020-15598.patch

This patch is a backport of the git commit, that brings back the former behavior of the regular expression matching. [...]

As I understand the issue: Matching behaviour changed from version 2.x to 3.x, and some rules (in the coreruleset) can now trigger resource exhaustion. CRS team wants modsecurity to fix it (that is what the patch should do). Modsecurity team wants CRS to fix their rules.

@dune73
Copy link

dune73 commented Sep 15, 2020

CRS project here: Vendor has reverted behavior but refuses to release an update. The patch in question is derived from the official tree of the vendor. It's also the patch that NGINX Plus uses and the one that Debian is going to use (but has not pushed to the repo yet).

@tnias tnias closed this Dec 2, 2020
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

4 participants