Package: smemstat / 0.01.10-2


Package Version Patches format
smemstat 0.01.10-2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Fix null ptr dereference when UID can t be read LP 1.patch | (download)

smemstat.c | 29 25 + 4 - 0 !
1 file changed, 25 insertions(+), 4 deletions(-)

 [patch] fix null ptr dereference when uid can't be read (lp:
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

While stress testing a machine with a lot of low memory
pressure and processes fork/exiting very rapidly I found
that smemstat reads empty /proc/$pid/status files and hence
cannot get a process UID. This leads to no umame being
found for a new mem_info item and later on the deference
of m->uname->name segfaults on a null pointer deference
because m->uname is NULL.

Add a one-liner helper to check for the null uname and
return "<unknown>" for unknown UID uname lookups instead
of segfaulting.

Signed-off-by: Colin Ian King <>