3\. smfa_utils.c: smfa_cbk_list_cleanup(): Coverity tool shows use-after-free 
problem. That could happen only when a special path is walked through, which in 
practice never happens.

Use-after-free at "prev_cbk->next_cbk" in the else case.
It could happen only if the previous round of the loop went to the "if" case 
and did "prev_cbk = cbk_list".

The proposed solution is to introduce an extra checking:

                prev_cbk = cbk_list;
        }else {
                                free(cbk_list);
\-      cbk_list = prev_cbk->next_cbk;
\+      cbk_list = NULL;
\+      if(prev_cbk)
\+              cbk_list = prev_cbk->next_cbk;
        }
   }



---

** [tickets:#1154] smf: defects detected by Coverity tool should be fixed**

**Status:** assigned
**Milestone:** 4.6.FC
**Created:** Mon Oct 06, 2014 11:38 AM UTC by Robert Apanowicz
**Last Updated:** Tue Feb 03, 2015 11:14 AM UTC
**Owner:** Robert Apanowicz

This ticket is the placeholder for all the defects of SMF which are detected by 
Coverity tool.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to