Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 110480 - [PATCH] vmstat segfaults due to buffer overflow
[PATCH] vmstat segfaults due to buffer overflow
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: procps (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-11-19 17:09 EST by Neil Horman
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-28 13:49:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to increase buffer size to avoid segfault in large /proc/stat files (349 bytes, patch)
2003-11-19 17:11 EST, Neil Horman
no flags Details | Diff

  None (edit)
Description Neil Horman 2003-11-19 17:09:23 EST
Description of problem:
when /proc/stat grows to more the 8192 bytes in length, vmstat
segfaults while parsing out contents

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.create a system where /proc/stat has more than 8192 characters
2.run vmstat
Actual results:

Expected results:
normal operation

Additional info:
Comment 1 Neil Horman 2003-11-19 17:11:49 EST
Created attachment 96071 [details]
patch to increase buffer size to avoid segfault in large /proc/stat files

This patch just increases the buffer size which would otherwise overflow on
large /proc/stat files.  I know this is really just running away from the
problem, but it seemed that making the allocation for this buffer dynamic or
iterating over the buffer in multiple reads would be overly complex given that
its a proc file which is (IIRC) going away in the 2.6 kernel.
Comment 2 Daniel Walsh 2004-02-11 09:01:48 EST
Total rewrite in 3.1.15.
 Please check this version.


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