CVE-2009-0663: Buffer Overflow

Published Apr 23, 2009
·
Updated

A heap-based buffer overflow flaw was found in perl-DBD-Pg's pggetline. When pggetline is used, pgdbgetline (in dbdimp.c) is called that gets buffer of size length (specified by pggetline called) passed to it. Data read from the DB server is stored in temporary buffer pointed to by tempbuf and later copied to the buffer passed to pgdbgetline as:

strncpy(buffer, tempbuf, strlen(tempbuf)+1); buffer[strlen(tempbuf)] = '\0';

This incorrectly uses source length as copy size limit, not the destination length, allowing overflow of input buffer.

This problem should be fixed in DBD-Pg versions 2.x, where pgdbgetline completely ignores length argument of pggetline, allocating buffer of the required size.

Other sources

Heap-based buffer overflow in the DBD::Pg (aka DBD-Pg or libdbd-pg-perl) module 1.49 for Perl might allow context-dependent attackers to execute arbitrary code via unspecified input to an application that uses the getline and pggetline functions to read database rows.

Affected Software

4 affected components
Perl Perl
cmu Dbd\=\-pg
All of the following
Perl Perl
cmu Dbd\=\-pg

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.x

Event History

Apr 23, 2009
Data Sourced
via Red Hat·03:15 PM
DescriptionSeverityAffected Software
Apr 30, 2009
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
Description
Data Sourced
08:30 PM
DescriptionWeaknessAffected Software
Data Sourced
via NVD·08:30 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 29, 2017
Data Sourced
01:33 AM
RemedySeverity

Frequently Asked Questions

1

What is the severity of CVE-2009-0663?

CVE-2009-0663 is considered a critical vulnerability due to the potential for arbitrary code execution.

2

How do I fix CVE-2009-0663?

To fix CVE-2009-0663, upgrade the DBD::Pg module to a version that is not affected by this vulnerability.

3

What software is affected by CVE-2009-0663?

CVE-2009-0663 affects the DBD::Pg module version 1.49 for Perl.

4

Can CVE-2009-0663 be exploited remotely?

Yes, CVE-2009-0663 can be exploited by context-dependent attackers through specific input.

5

What functions in DBD::Pg are related to CVE-2009-0663?

The functions getline and pg_getline in the DBD::Pg module are related to CVE-2009-0663.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203