Package: smemstat / 0.01.10-2
Patch seriesview the series file
|0001 Fix null ptr dereference when UID can t be read LP 1.patch | (download)||
29 25 + 4 - 0 !
[patch] fix null ptr dereference when uid can't be read (lp: #1473245) 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 <email@example.com>