---

** [tickets:#1095] imm: imm can crash in saImmOiAugmentCcbInitialize**

**Status:** unassigned
**Milestone:** 4.3.3
**Created:** Tue Sep 16, 2014 01:26 PM UTC by Zoran Milinkovic
**Last Updated:** Tue Sep 16, 2014 01:26 PM UTC
**Owner:** nobody

In saImmOiAugmentCcbInitialize, if immsv_om_handle_initialize returns non 
SA_AIS_OK, then "rc" value is converted in SA_AIS_ERR_TRY_AGAIN (cl_node == 
NULL)
In "done:" block, the call of imma_oi_ccb_record_augment may crash the library, 
accessing fields in cl_node struct, which is NULL


                cl_node = NULL; /* avoid unsafe use */

                if(immsv_om_handle_initialize) {/*This is always the first 
immsv_om_ call */
                        rc = immsv_om_handle_initialize(&privateOmHandle, 
&version);
                } else {
                        TRACE("ERR_LIBRARY: Error in library linkage. 
libSaImmOm.so is not linked");
                        rc = SA_AIS_ERR_LIBRARY;
                }

                if(rc != SA_AIS_OK) {
                        TRACE("ERR_TRY_AGAIN: failed to obtain internal om 
handle rc:%u", rc);
                        rc = SA_AIS_ERR_TRY_AGAIN;
                        goto done;
                }

.....

done:

        if (locked) {
                m_NCS_UNLOCK(&cb->cb_lock, NCS_LOCK_WRITE);
        }

        if(rc == SA_AIS_OK || rc == SA_AIS_ERR_TRY_AGAIN) {
                /* mark oi_ccb_record with privateOmHandle to avoid repeated 
open/close
                   of private-om-handle for each try again or each ccb op. The 
handle
                   is closed when the ccb is terminated (apply-uc or abort-uc).
                 */
                imma_oi_ccb_record_augment(cl_node, ccbId, privateOmHandle, 
privateAoHandle);

.....


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net 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.
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to