CVE-2016-0773: Buffer Overflow
A vulnerability was found in a way postgresql processes specially crafted regular expressions.
Purpose-crafted regular expressions elicited an integer overflow when computing a heap allocation size, and the server proceeded to write past the end of the undersized buffer. This could reliably crash the server, and we have not ruled out the viability of attacks that lead to privilege escalation. If an application accepts arbitrary regular expressions from its users, they can exploit this without otherwise having access to query the database.
Acknowledgements:
Red Hat would like to thank PostgreSQL upstream for reporting this issue. Upstream acknowledges Tom Lane and Greg Stark as the original reporters.
Other sources
PostgreSQL before 9.1.20, 9.2.x before 9.2.15, 9.3.x before 9.3.11, 9.4.x before 9.4.6, and 9.5.x before 9.5.1 allows remote attackers to cause a denial of service (infinite loop or buffer overflow and crash) via a large Unicode character range in a regular expression.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/postgresqlto a version that resolves this vulnerability.Fixed in 9.5.1 - Upgrade
Upgrade
redhat/postgresqlto a version that resolves this vulnerability.Fixed in 9.4.6 - Upgrade
Upgrade
redhat/postgresqlto a version that resolves this vulnerability.Fixed in 9.3.11 - Upgrade
Upgrade
redhat/postgresqlto a version that resolves this vulnerability.Fixed in 9.2.15 - Upgrade
Upgrade
redhat/postgresqlto a version that resolves this vulnerability.Fixed in 9.1.20
Event History
Frequently Asked Questions
What is the severity of CVE-2016-0773?
CVE-2016-0773 has been classified as a denial of service vulnerability that can crash PostgreSQL instances.
How do I fix CVE-2016-0773?
To fix CVE-2016-0773, upgrade PostgreSQL to versions 9.1.20, 9.2.15, 9.3.11, 9.4.6, or 9.5.1 or later.
What are the affected versions for CVE-2016-0773?
CVE-2016-0773 affects PostgreSQL versions prior to 9.1.20, 9.2.x versions before 9.2.15, 9.3.x versions before 9.3.11, 9.4.x versions before 9.4.6, and 9.5.x versions before 9.5.1.
Who can exploit CVE-2016-0773?
Remote attackers can exploit CVE-2016-0773 by sending specially crafted regular expressions to a vulnerable PostgreSQL server.
What is the impact of CVE-2016-0773?
The impact of CVE-2016-0773 is a denial of service condition that results in the PostgreSQL server entering an infinite loop or experiencing a buffer overflow, leading to a crash.