On Wed, Mar 13, 2013 at 12:38:40PM +0000, Karl E. Jorgensen wrote:
> We found that under the following circumstances:
> * Kernel > 3.2.29 (which shows > 32 groups in /proc/${pid}/status)
> * one or more users logged in with lots of supplementary groups
Hi Karl,
  Can you look at the change at
https://www.gitorious.org/procps/procps/commit/7933435584aa1fd75460f4c7715a3d4855d97c1c

and see if that fixes (or rather works-around) the problem? The patch
used 4k not 8k but:
> karl@someserver: ~$ wc --bytes < /proc/1997/status
> 1810

that appears to be ok for now.

> I have a (temporary) patch which increases the buffer size to 8K,
> which appears sufficient in our case. But this does not fix the
> underlying problem of having a limited buffer size to start with...
You're correct, it shouldn't be a statically defined number. It's a
buffer overflow because the read in file2str protects it but the
subsequent structure may be a little sad.

I'm thinking a size for 32 groups with a realloc/read loop might 
be the way to go.

 - Craig
-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to