Red Hat Bugzilla – Bug 110480
[PATCH] vmstat segfaults due to buffer overflow
Last modified: 2007-11-30 17:06:59 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):
Steps to Reproduce:
1.create a system where /proc/stat has more than 8192 characters
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.
Total rewrite in 3.1.15.
Please check this version.