Bug 110480 - [PATCH] vmstat segfaults due to buffer overflow
Summary: [PATCH] vmstat segfaults due to buffer overflow
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: procps
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-19 22:09 UTC by Neil Horman
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-28 17:49:05 UTC
Target Upstream Version:
Embargoed:


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

Description Neil Horman 2003-11-19 22:09:23 UTC
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:
always

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

Expected results:
normal operation

Additional info:

Comment 1 Neil Horman 2003-11-19 22:11:49 UTC
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 14:01:48 UTC
Total rewrite in 3.1.15.
 Please check this version.

Dan


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