-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
nginx: upgrade pcre to pcre2 #355989
nginx: upgrade pcre to pcre2 #355989
Conversation
Nginx builds with pcre2 by default as of version 1.21.5.
Do we have a tracking issue for this? I learned the other day that Debian is phasing out PCRE because of security concerns, so we should probably follow suit. |
If there is, I'm not aware of it. |
Do the lua modules work? |
I’ve opened #356387 to track this. |
@Izorkin Debian already started working on removing PCRE in 2021 and the library is EOL. The latest Debian stable release doesn’t ship it at all. I doubt anything significant is broken by this (and anything that is broken by it is probably in a dire maintenance state). |
@ofborg build nginx.passthru.tests |
Should we wait for after the stable release? |
I think the opposite – we should backport this to 24.11 because we’re exposing a library that went EOL in 2021 and hasn’t been updated since to untrusted user input. My previous comment was wrong on the timeline: Debian considered it too risky for that purpose at the time, which is why they’ve already removed it. It’s concerning that we’ve fallen so far behind, especially for something as security‐critical as Nginx. |
Then I think we should go for it |
|
cc @thoughtpolice @lblasc @kalekseev for OpenResty |
(Pinging because this would break OpenResty unless we presumably backport a patch from upstream Nginx or perhaps bump the version 😅) |
I'll look today. |
Upgrading openresty to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me! Looks like it should be backwards‐compatible enough for the backport. I’ll let @lblasc take another look before merging.
Successfully created backport PR for |
With this change my nginx fails to start with bad system call. I confirmed this by deploying it with an override on pcre2 to pcre.
dmesg contains:
syscall 319 maps to memfd_create. It feels similar to #179444 but neither disabling MemoryDenyWriteExecute nor allowing memfd_create fixed the crash. |
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
I did a fix in #360008 |
This reverts commit 861b05c. See NixOS#355989 & NixOS#360008. This needs more testing and polish.
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see #355989 (comment) (cherry picked from commit 996f9e4)
This also disables the memfd_create syscall which is required for certain regex's when using pcre2. see NixOS#355989 (comment)
Nginx builds with pcre2 by default as of version 1.21.5.
I've tested with both
nginx
andnginxMainline
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.