pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stuart McGraw <smcg4191@mtneva.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: regex DoS in postgresql?
Date: Sat, 2 Mar 2019 21:11:16 -0700
Message-ID: <dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com> (raw)

I would like to deploy a web application with a Postgresql backend
that allows a user to both add a record containing arbitrary text,
and to search that text column with an arbitrary regular expression.

My question is, is the app subject to a regex denial of service attack?

I would have presumed so but I have been unable produce any problems
when testing using the "evil" regexs described in the Wikipedia
article on the subject: https://en.wikipedia.org/wiki/ReDoS

Is there something in the way Postgresql implements its RE engine
that makes it immune to this attack?

Thanks for any enlightenment...




view thread (2+ messages)  latest in thread

Message-ID: <dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com>
Permalink:  ../dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com/
Also on:    postgresql.org/message-id/dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: smcg4191@mtneva.com
  Subject: Re: regex DoS in postgresql?
  In-Reply-To: <dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com>
  References: <dbc6cd12-8147-a66d-9471-eed4df3a8292@mtneva.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox