Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0ITL-0008Nz-Pk for pgsql-general@arkaria.postgresql.org; Sun, 03 Mar 2019 04:11:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h0ITK-0006h9-6w for pgsql-general@arkaria.postgresql.org; Sun, 03 Mar 2019 04:11:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0ITJ-0006bF-RW for pgsql-general@lists.postgresql.org; Sun, 03 Mar 2019 04:11:30 +0000 Received: from mail-it1-f175.google.com ([209.85.166.175]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0ITC-0002ac-EH for pgsql-general@postgresql.org; Sun, 03 Mar 2019 04:11:28 +0000 Received: by mail-it1-f175.google.com with SMTP id l139so2843547ita.5 for ; Sat, 02 Mar 2019 20:11:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=W1Fws1Gd0IyRZjACvgTFkzeSBcfCHgBUOgvEDCPtMnM=; b=n8rkxdt3A9UQNi62XoL6ugOhktZGk7jTT70UhQP90ldn5rS2N2AITXM9TAKu+5Kwmm 5+JE1G743AHAmKscO20D8/o6lngFfrIt7ymTeVDD2Iyr+4M1PAWKRgFWO3KqGVOR9cxU +HojnUxlRMrfozkSZwzvzCohmPYgmkhuCeJgWPRcGOJbSL3T3NenC7R6TeCbCi9lUZh3 lcxF/wXzGKZcbgn/tCaArUtY27gmdMPrDpYBW3QUQc8AfP6fpzRgcLZh9TFlE44/qN4a GyeUazJ/dAN6eOayApBQgpUHidc1T0rqzX4RcwIqkfzcLM9WM4LSv1XEXIR9Oi32KpsV DlWA== X-Gm-Message-State: APjAAAWwlewwaZD/lTpJdrS5S9U81fbm9+d15TGEJ77zSYtURcYXiNzn NgVnv6+SJ3m2tFfXwoTd2P70k0Qp X-Google-Smtp-Source: APXvYqztyxfnDGZ994eO99e67mbbD6j8EbaH4iXc2fOvTlfe69D6iI/siTs7GbeR2fTSLuP6jqZX8Q== X-Received: by 2002:a24:450d:: with SMTP id y13mr7120840ita.3.1551586280676; Sat, 02 Mar 2019 20:11:20 -0800 (PST) Received: from fuji.home ([65.183.81.59]) by smtp.gmail.com with ESMTPSA id u197sm1404951itb.9.2019.03.02.20.11.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Mar 2019 20:11:20 -0800 (PST) Received: from fuji.home (fuji.home [10.1.65.222]) by fuji.home (Postfix) with ESMTPS id 4ECCF6800F6 for ; Sat, 2 Mar 2019 21:11:16 -0700 (MST) From: Stuart McGraw Subject: regex DoS in postgresql? To: "pgsql-general@postgresql.org" Message-ID: Date: Sat, 2 Mar 2019 21:11:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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...