The bitsubstr function in backend/utils/adt/varbit.c in PostgreSQL 8.0.23, 8.1.11, and 8.3.8 allows remote authenticated users to cause a denial of service (daemon crash) or have unspecified other impact via vectors involving a negative integer in the third argument, as demonstrated by a SELECT statement that contains a call to the substring function for a bit string, related to an "overflow."
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9720
https://exchange.xforce.ibmcloud.com/vulnerabilities/55902
https://bugzilla.redhat.com/show_bug.cgi?id=559259
https://bugzilla.redhat.com/show_bug.cgi?id=559194
http://www.vupen.com/english/advisories/2010/1221
http://www.vupen.com/english/advisories/2010/1207
http://www.vupen.com/english/advisories/2010/1197
http://www.vupen.com/english/advisories/2010/1022
http://www.redhat.com/support/errata/RHSA-2010-0429.html
http://www.redhat.com/support/errata/RHSA-2010-0428.html
http://www.redhat.com/support/errata/RHSA-2010-0427.html
http://www.openwall.com/lists/oss-security/2010/01/27/5
http://www.debian.org/security/2010/dsa-2051
http://ubuntu.com/usn/usn-933-1
http://securitytracker.com/id?1023510
http://intevydis.blogspot.com/2010/01/postgresql-8023-bitsubstr-overflow.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567058
http://archives.postgresql.org/pgsql-hackers/2010-01/msg00634.php
http://archives.postgresql.org/pgsql-committers/2010-01/msg00125.php