procps/proc
Jim Warner 50ae55ef10 library: avoid problems involving 'supgid' mishandling
Following that patch referenced below, the top SUPGRPS
field would produce a segmentation fault and ps SUPGRP
would often show "(null)". Such problems resulted from
some faulty logic in the status2proc() routine dealing
with 'Groups' (supgid) which served as a source field.

For many processes the original code produced an empty
string which prevented conversion to the expected "-".
Moreover, prior to release 3.3.15 such an empty string
will become 0 after strtol() which pwcache_get_group()
translates to 'root' yielding very misleading results.

So, now we'll check for empty '/proc/#/status/Groups:'
fields & consistently provide a "-" value for callers.

[ we'll also protect against future problems in that ]
[ new qualys logic by always ensuring valid 'supgrp' ]
[ pointers - logic which revealed our original flaw! ]

Reference(s):
. original qualys patch
0071-proc-readproc.c-Harden-supgrps_from_supgids.patch

Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-06-09 21:35:20 +10:00
..
.gitignore
COPYING
devname.c
devname.h
diskstats.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
diskstats.h
escape.c 0051-proc/escape.c: Prevent buffer overflows in escape_command(). 2018-06-09 21:35:19 +10:00
escape.h
libprocps.pc.in
libprocps.sym
meminfo.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
meminfo.h
namespace.c
namespace.h
numa.c
numa.h
pids.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
pids.h
procps-private.h
procps.h
pwcache.c
pwcache.h
readproc.c library: avoid problems involving 'supgid' mishandling 2018-06-09 21:35:20 +10:00
readproc.h
slabinfo.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
slabinfo.h
stat.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
stat.h
sysinfo.c
sysinfo.h
test_namespace.c
test_pids.c
test_sysinfo.c
test_uptime.c
test_version.c
uptime.c
uptime.h
version.c
version.h
vmstat.c library: clean up some miscellaneous compiler warnings 2018-06-09 21:35:20 +10:00
vmstat.h
wchan.c
wchan.h
xtra-procps-debug.h