git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 9, 2017, 00:37 UTC
Message-ID
<20170509003714.ylwn5ezvu5h36kj7@genre.crustytoothpaste.net>
In-Reply-To
<CACBZZX4G_ThE55Gi53QJt1=9K4jQXqJ3QL8JSGpiSSSDRrKeNA@mail.gmail.com>
On Tue, May 09, 2017 at 02:00:18AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 18 quoted lines
> On Tue, May 9, 2017 at 1:32 AM, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> > PCRE and PCRE2 also tend to have a lot of security updates, so I would
> > prefer if we didn't import them into the tree.  It is far better for
> > users to use their distro's packages for PCRE, as it means they get
> > automatic security updates even if they're using an old Git.
> >
> > We shouldn't consider shipping anything with a remotely frequent history
> > of security updates in our tree, since people very frequently run old or
> > ancient versions of Git.
> 
> I'm aware of its security record[1], but I wonder what threat model
> you have in mind here. I'm not aware of any parts of git (except maybe
> gitweb?) where we take regexes from untrusted sources.
> 
> I.e. yes there have been DoS's & even some overflow bugs leading code
> execution in PCRE, but in the context of powering git-grep & git-log
> with PCRE this falls into the "stop hitting yourself" category.

Just because you don't drive Git with untrusted regexes doesn't mean other people don't. It's not a good idea to require a stronger security model than we absolutely have to, since people can and will violate it. Think how devastating Shellshock was even though technically nobody should provide insecure environment variables to the shell.

And, yes, gitweb does in fact call git grep. That means that git grep must in fact be secure against untrusted regexes, or you have a remote code execution vulnerability.

Furthermore, at work we distribute Git with all releases of our product. We normally only do non-security updates to the last couple of releases, but we provide security updates to all supported versions. I'm not comfortable shipping the entirety of PCRE or PCRE2 to customers without providing security updates, so you're going to make my job (and my coworkers') a lot harder by shipping it. Please don't.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
Previous: Ævar Arnfjörð BjarmasonNext: Johannes Schindelin
Message 28 of 36 in “What's cooking in git.git (May 2017, #01; Mon, 1)”
  1. Junio C HamanoMay 1, 2017
  2. Ævar Arnfjörð BjarmasonMay 1, 2017
  3. Brandon WilliamsMay 1, 2017
  4. Ævar Arnfjörð BjarmasonMay 1, 2017
  5. Jeff KingMay 1, 2017
  6. Junio C HamanoMay 1, 2017
  7. Ævar Arnfjörð BjarmasonMay 2, 2017
  8. Junio C HamanoMay 2, 2017
  9. Ævar Arnfjörð BjarmasonMay 2, 2017
  10. Johannes SchindelinMay 2, 2017
  11. PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)Johannes Schindelin, May 2, 2017
  12. Ævar Arnfjörð BjarmasonMay 2, 2017
  13. Johannes SchindelinMay 2, 2017
  14. Ævar Arnfjörð BjarmasonMay 2, 2017
  15. Kevin DaudtMay 2, 2017
  16. Ævar Arnfjörð BjarmasonMay 2, 2017
  17. Johannes SchindelinMay 3, 2017
  18. Duy NguyenMay 3, 2017
  19. Ævar Arnfjörð BjarmasonMay 3, 2017
  20. Johannes SchindelinMay 4, 2017
  21. Ævar Arnfjörð BjarmasonMay 4, 2017
  22. Johannes SchindelinMay 4, 2017
  23. Ævar Arnfjörð BjarmasonMay 4, 2017
  24. Ævar Arnfjörð BjarmasonMay 8, 2017
  25. Junio C HamanoMay 8, 2017
  26. brian m. carlsonMay 8, 2017
  27. Ævar Arnfjörð BjarmasonMay 9, 2017
  28. brian m. carlsonMay 9, 2017
  29. Johannes SchindelinMay 9, 2017
  30. Ævar Arnfjörð BjarmasonMay 9, 2017
  31. Ævar Arnfjörð BjarmasonMay 9, 2017
  32. demerphqMay 9, 2017
  33. Ævar Arnfjörð BjarmasonMay 9, 2017
  34. Brandon WilliamsMay 2, 2017
  35. Ævar Arnfjörð BjarmasonMay 2, 2017
  36. Ramsay JonesMay 5, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.