This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 167165 - potential buffer overflow in tog-pegasus
potential buffer overflow in tog-pegasus
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: tog-pegasus (Show other bugs)
4.0
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:
Environment:
Last Closed: 2005-10-05 09:44:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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:

src/Pegasus/Common/Config.h:
#ifndef PEGASUS_PATH_MAX
#ifndef PATH_MAX
#define PEGASUS_PATH_MAX 4096
#else 
#define PEGASUS_PATH_MAX PATH_MAX
#endif
#endif

src/Pegasus/Common/System.cpp:
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.

http://rhn.redhat.com/errata/RHEA-2005-494.html

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