CWE
94 119
Advisory Published
CVE Published
Updated

CVE-2009-4035: Code Injection

First published: Thu Nov 26 2009(Updated: )

SuSE reported a buffer overflow in FoFiType1::parse affecting older xpdf versions. Code snippets from fofi/FoFiType1.cc: 133 void FoFiType1::parse() { ... 163 line = getNextLine(line); 164 for (j = 0; j < 300 && line; ++j) { 165 line1 = getNextLine(line); 166 if ((n = line1 - line) > 255) { 167 n = 255; 168 } 169 strncpy(buf, line, n); getNextLine can, however, return NULL: 117 char *FoFiType1::getNextLine(char *line) { 118 while (line < (char *)file + len && *line != '\x0a' && *line != '\x0d') { 119 ++line; 120 } 121 if (line < (char *)file + len && *line == '\x0d') { 122 ++line; 123 } 124 if (line < (char *)file + len && *line == '\x0a') { 125 ++line; 126 } 127 if (line >= (char *)file + len) { 128 return NULL; 129 } Therefore, (line1 - line) is not defined / results in negative value n. That value is later passed to strncpy, causing overflow of buf buffer.

Credit: secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
Gnome Gpdf=2.8.2
Kde Kpdf=3.3.1
Kde Kdegraphics=3.3.1
Xpdf Xpdf=3.0.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

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.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203