[Openswan Users] Possible bug?

David McCullough david_mccullough at mcafee.com
Thu Mar 18 06:27:58 EDT 2010


Jivin Hansjörg Pfister lays it down ...
> 
> Hi,
> 
> may be there's a bug in pluto:
> 
> In ikev1_quick.c (2.6.24) you'll find the following at line 1972:
> 
> 	 if (st->st_pfs_group != NULL) {
> 		e = build_ke(&qke->qke_pcrc, st, st->st_pfs_group, ci);
> 	    } else {
> 		e = build_nonce(&qke->qke_pcrc, st, ci);
> 	    }
> 	
> 	    passert(st->st_connection != NULL);      <- this condition may be
> sometimes true because:
> 
> in build_nonce there is at line 248:
> 
> event_schedule(EVENT_CRYPTO_FAILED, EVENT_CRYPTO_FAILED_DELAY, st);
> 
> this event will delete st_connection!
> Same in build_ke!

This is ok,  event_schedule schedules the event for later.  Since pluto is
single threaded and the event will trigger later in the event loop,
st->st_connection will be still valid after returning from
build_nonce/build_ke.

Cheers,
Davidm

-- 
David McCullough,      david_mccullough at mcafee.com,  Ph:+61 734352815
McAfee - SnapGear      http://www.mcafee.com         http://www.uCdot.org


More information about the Users mailing list