[ofa-general] Re: [PATCHv3] opensm/osm_lash: Fix use after free problem in osm_mesh_node_delete

Sasha Khapyorsky sashak at voltaire.com
Sun Aug 2 04:57:35 PDT 2009


On 07:17 Sun 02 Aug     , Hal Rosenstock wrote:
> >
> > > +{
> > > +     if (p_lash->switches) {
> > > +             unsigned id;
> > > +             for (id = 0; ((int)id) < p_lash->num_switches; id++)
> > > +                     if (p_lash->switches[id])
> > > +                             osm_mesh_node_delete(p_lash,
> > > +                                                  p_lash->switches[id]);
> > > +     }
> > > +}
> > > +
> > > +
> > >  static void free_lash_structures(lash_t * p_lash)
> > >  {
> > >       unsigned int i, j, k;
> > > @@ -1219,7 +1232,7 @@ static int lash_process(void *context)
> > >
> > >       return_status = discover_network_properties(p_lash);
> >
> > discover_network_properties() can fail in a middle of allocations and
> > full clean is desired anyway. It should be safe to 'goto Exit' below
> > since mesh node deletion is protected against not yet initialized input.
> 
> 
> It's not;

Could you elaborate?

Sasha



More information about the general mailing list