[CRIU] Looks like stack garbage could be dereferenced in collect_pstree_ids_predump()

Batalov Eugene eabatalov89 at gmail.com
Thu Oct 15 09:56:07 PDT 2015


Hello.

Please take a look at ./cr-dump.c:717-742 lines:

717: struct pstree_item *item; // local pointer variable isn't initialized
explicitly
...
// First use of item is here:
734     for_each_pstree_item(item) {

// Here is how macro is defined
75 #define for_each_pstree_item(pi) \
76     for (pi = root_item; pi != NULL; pi = pstree_item_next(pi))

Looks like
struct pstree_item *item = NULL;
is needed here.

-- 
Best regards,
Eugene Batalov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20151015/de988172/attachment.html>


More information about the CRIU mailing list