Bug 167165 - potential buffer overflow in tog-pegasus
potential buffer overflow in tog-pegasus
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tog-pegasus (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Stein
: Security
Depends On:
Blocks: 156322
  Show dependency treegraph
Reported: 2005-08-31 05:03 EDT by Brian Stein
Modified: 2013-03-01 00:14 EST (History)
1 user (show)

See Also:
Fixed In Version: RHEA-2005-494
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-05 09:44:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Arjan van de Ven 2005-08-31 05:03:31 EDT
Description of problem:

char *System::extract_file_name(const char *fullpath, char *basename)
  char *p;
  char buff[2048];
  if (fullpath == NULL)
      basename[0] = '\0';
      return basename;
  strcpy(buff, fullpath);

there is no guarantee that any kind of filename is shorter than 2048 bytes.
Comment 1 Jason Vas Dias 2005-09-01 07:17:29 EDT
This is now fixed with tog-pegasus-2.4.1-4.rhel4:

#ifndef PATH_MAX
#define PEGASUS_PATH_MAX 4096

char *System::extract_file_path(const char *fullpath, char *dirname)
  char *p;
  char buff[PEGASUS_PATH_MAX];
  if (fullpath == NULL)
      dirname[0] = '\0';
      return dirname;
  strncpy(buff, fullpath, PEGASUS_PATH_MAX);
Comment 2 Red Hat Bugzilla 2005-10-05 09:44:39 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.