Bug 316511 (CVE-2007-4772)

Summary: CVE-2007-4772 postgresql DoS via infinite loop in regex NFA optimization code
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bressers, kreilly, mmaslano, tgl
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.2.6-1.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 08:57:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 427135, 427136, 427137, 427138, 427220, 427221, 427772, 427773, 427774, 432510, 432511, 867793    
Bug Blocks: 816611    

Description Tomas Hoger 2007-10-03 07:43:35 UTC
Will Drewry of the Google Security Team reported a problem in regular
expressions code use by PostreSQL which results in a non-terminating infinite
loop during
nondeterministic finite automata optimization.  These loops remain
even after the client disconnects and can be used to hog CPU and
connections to the database until a full-fledged denial of service
condition occurs.

Comment 2 Tom Lane 2007-10-03 14:48:53 UTC
Note that these same looping behaviors have been reproduced in Tcl.  Not sure if that should get its own 
CVE or not.

Comment 4 Tomas Hoger 2007-10-03 15:03:47 UTC
If it's same code used in multiple products / projects (usually taken from one
project to another), single CVE id is usually used.

Comment 12 Tomas Hoger 2008-01-07 13:56:31 UTC
Public now, lifting embargo:

http://www.postgresql.org/about/news.905
http://www.postgresql.org/support/security.html

Comment 14 Tomas Hoger 2008-01-08 09:40:03 UTC
TCL fixed in 8.5.0, patch:

http://tcl.cvs.sourceforge.net/tcl/tcl/generic/regc_nfa.c?r1=1.9&r2=1.10


Comment 17 Fedora Update System 2008-01-11 22:14:08 UTC
postgresql-8.2.6-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2008-01-11 22:24:14 UTC
postgresql-8.2.6-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 errata-xmlrpc 2013-01-08 04:51:32 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:0122 https://rhn.redhat.com/errata/RHSA-2013-0122.html