CVE-2009-1956: Buffer Overflow

Published Jun 6, 2009
·
Updated

A single NULL byte buffer overflow flaw was found in apr-util's aprbrigadevprintf() function.

First let's assume the worst case and an attacker can control exactly what is being sent to aprbrigadevprintf and can trigger this issue by filling the buckets just right so you end up with one that is perfectly full as per the explanation at http://www.mail-archive.com/dev@apr.apache.org/msg21592.html

632 APUDECLARE(aprstatust) aprbrigadevprintf(aprbucketbrigade b, ... 638 struct brigadevprintfdatat vd; 639 char buf[APRBUCKETBUFFSIZE]; 640 aprsizet written; ... 656 (vd.vbuff.curpos) = '\0'; ... 659 return aprbrigadewrite(b, flush, ctx, buf, vd.vbuff.curpos - buf);

If we get to line 656 with vd.vbuff.curpos pointing to one past the end of buf we write a single NULL to the next thing on the stack after buf. And on the Linux x86 and x8664 builds we looked at this is actually the first byte of the vd structure, which is in fact the LSB of vd.vbuff.curpos itself.

So the only use of this after the overwrite is on line 659 where vd.vbuff.curpos gets used to calculate how much to write. Before the overwrite vd.vbuff.curpos was buf+APRBUCKETBUFFSIZE (8000), but now it could be between 0 and 255 bytes less. So aprbrigadewrite will end up writing out between 0 and 255 bytes less than it ought to, causing the truncation seen in the original bug report.

So for little endian systems it doesn't seem to have any security consequence. Of course for a big endian system aprbrigadewrite could end up dumping large amounts of memory (so an info disclosure leak or crash).

Other sources

Off-by-one error in the aprbrigadevprintf function in Apache APR-util before 1.3.5 on big-endian platforms allows remote attackers to obtain sensitive information or cause a denial of service (application crash) via crafted input.

Affected Software

6 affected components
Apache apr-util<=1.3.4
Apache HTTP Server>=2.2.0<2.2.12
Canonical Ubuntu Linux=6.06
Canonical Ubuntu Linux=8.04
Canonical Ubuntu Linux=8.10
Canonical Ubuntu Linux=9.04

Event History

Jun 6, 2009
Data Sourced
12:12 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·06:00 PM
Data Sourced
via MITRE·06:00 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2009-1956?

CVE-2009-1956 has a medium severity rating due to the potential for a buffer overflow that could lead to application crashes or execution of arbitrary code.

2

How do I fix CVE-2009-1956?

To fix CVE-2009-1956, update the Apache APR-util package to version 1.3.5 or higher.

3

What software is affected by CVE-2009-1956?

CVE-2009-1956 affects Apache APR-util versions up to 1.3.4 and Apache HTTP Server versions between 2.2.0 and 2.2.12.

4

Can CVE-2009-1956 be exploited remotely?

Yes, CVE-2009-1956 can potentially be exploited remotely if an attacker can control input to the affected functions.

5

Is CVE-2009-1956 present in specific Linux distributions?

Yes, CVE-2009-1956 is present in specific versions of Ubuntu Linux, including 6.06, 8.04, 8.10, and 9.04.

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