PostgreSQL make_select_stmt function buffer overflow

postgresql-makeselectstmt-input-bo (19376) The risk level is classified as HighHigh Risk

Description:

PostgreSQL could allow a remote attacker to execute arbitrary code, caused by a vulnerability in the make_select_stmt function. By sending a specially-crafted query containing into variables in a SQL statement, a remote attacker could overflow a buffer and execute arbitrary code on the system with user privileges.

Platforms Affected:

  • Canonical, Ubuntu 4.10
  • Conectiva, Linux 10
  • Debian, Debian Linux 3.0
  • Gentoo, Linux
  • MandrakeSoft, Mandrake Linux 10.0 AMD64
  • MandrakeSoft, Mandrake Linux 10.0
  • MandrakeSoft, Mandrake Linux 10.1 X86_64
  • MandrakeSoft, Mandrake Linux 10.1
  • MandrakeSoft, Mandrake Linux Corporate Server 2.1 X86_64
  • MandrakeSoft, Mandrake Linux Corporate Server 2.1
  • MandrakeSoft, Mandrake Linux Corporate Server 3.0 X86_64
  • MandrakeSoft, Mandrake Linux Corporate Server 3.0
  • Novell, Linux Desktop 9
  • PostgreSQL, PostgreSQL 7.2
  • PostgreSQL, PostgreSQL 7.2.1
  • PostgreSQL, PostgreSQL 7.2.2
  • PostgreSQL, PostgreSQL 7.2.3
  • PostgreSQL, PostgreSQL 7.2.4
  • PostgreSQL, PostgreSQL 7.2.5
  • PostgreSQL, PostgreSQL 7.2.6
  • PostgreSQL, PostgreSQL 7.2.7
  • PostgreSQL, PostgreSQL 7.3
  • PostgreSQL, PostgreSQL 7.3.1
  • PostgreSQL, PostgreSQL 7.3.2
  • PostgreSQL, PostgreSQL 7.3.3
  • PostgreSQL, PostgreSQL 7.3.4
  • PostgreSQL, PostgreSQL 7.3.5
  • PostgreSQL, PostgreSQL 7.3.6
  • PostgreSQL, PostgreSQL 7.3.7
  • PostgreSQL, PostgreSQL 7.3.8
  • PostgreSQL, PostgreSQL 7.3.9
  • PostgreSQL, PostgreSQL 7.4
  • PostgreSQL, PostgreSQL 7.4.1
  • PostgreSQL, PostgreSQL 7.4.2
  • PostgreSQL, PostgreSQL 7.4.3
  • PostgreSQL, PostgreSQL 7.4.4
  • PostgreSQL, PostgreSQL 7.4.5
  • PostgreSQL, PostgreSQL 7.4.6
  • PostgreSQL, PostgreSQL 7.4.7
  • PostgreSQL, PostgreSQL 8.0.0
  • PostgreSQL, PostgreSQL 8.0.1
  • RedHat, Enterprise Linux 2.1 AW
  • RedHat, Enterprise Linux 2.1 WS
  • RedHat, Enterprise Linux 2.1 AS
  • RedHat, Enterprise Linux 2.1 ES
  • RedHat, Enterprise Linux 3 Desktop
  • RedHat, Enterprise Linux 3 WS
  • RedHat, Enterprise Linux 3 ES
  • RedHat, Enterprise Linux 3 AS
  • RedHat, Enterprise Linux 4 Desktop
  • RedHat, Enterprise Linux 4 WS
  • RedHat, Enterprise Linux 4 AS
  • RedHat, Enterprise Linux 4 ES
  • RedHat, Linux Advanced Workstation 2.1 Itanium
  • SuSE, Linux Enterprise Server 8
  • SuSE, SuSE Linux 8.2
  • SuSE, SuSE Linux 9.0
  • SuSE, SuSE Linux 9.1
  • SuSE, SuSE Linux 9.2
  • SuSE, SuSE Linux 9.3
  • SuSE, SuSE Linux Desktop 1.0
  • Turbolinux, Turbolinux 10 Desktop
  • Turbolinux, Turbolinux 10 F...
  • Turbolinux, Turbolinux 10 Server
  • Turbolinux, Turbolinux 7 Server
  • Turbolinux, Turbolinux 7 Workstation
  • Turbolinux, Turbolinux 8 Server
  • Turbolinux, Turbolinux 8 Workstation
  • Turbolinux, Turbolinux Home
  • Turbolinux, Turbolinux Appliance Server 1.0 Hosting Ed
  • Turbolinux, Turbolinux Appliance Server 1.0 Workgroup Ed

Remedy:

For Gentoo Linux:
Upgrade to the latest version of postgresql (8.0.1-r1, 7.4.7-r1, and 7.3.9-r1 or later), as listed in GLSA 200502-19. See References.

For Red Hat Linux:
Upgrade to the latest postgresql package, as listed below. Refer to RHSA-2005:150-04 or RHSA-2005:141-06 for more information. See References.

For Debian GNU/Linux 3.0 (woody):
Upgrade to the latest version of postgresql (7.2.1-2woody8 or later), as listed in DSA-683-1. See References.

For Ubuntu Linux 4.10:
Upgrade to the latest linux package (7.4.5-3ubuntu0.4 or later), as listed in USN-79-1 February 10, 2005. See References.

For Conectiva Linux:
Upgrade to the latest Postgresql package, as listed below. Refer to Conectiva Linux Announcement CLSA-2005:1008 for more information. See References.

Conectiva Linux 10.0: 7.4.2-57056U10_1cl or later

For other distributions:
Contact your vendor for upgrade or patch information.

Consequences:

Gain Access

References:

Reported:

Feb 16, 2005

The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (IBM Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

For corrections or additions please email xforce@iss.net

Return to the main page