[strongSwan-dev] Possible bug in task_manager.c

Howard Windsor Howard.Windsor at alcatel-lucent.com
Thu Oct 6 12:50:12 CEST 2011


Hi all

I'm not sure if this should go to the dev or users list. I suspect that 
the dev list  is the most appropriate.

While reviewing the code for bugs, I found the following and it looks odd.

Code versions : all recent ones up to and including the git repository 
on the strongswan website (I checked before asking here)

In libcharon/sa/task_manager.c
[ Line numbers as per git repository :
http://git.strongswan.org/?p=strongswan.git;a=blob;f=src/libcharon/sa/task_manager.c;h=c99de28d439f9d0649416edece3f9f6c271b2fb5;hb=HEAD 

]

In the initiate method in the "initiating already active tasks" part at 
the end . The switch statement sets up the "exchange" variable according 
to the task type. For the case IKE_MOBIKE: there is no break after 
setting the exchange, line 408 in the git repository version. This will 
cause the control flow to drop into the default case and go around the 
while loop again.

I believe that this would only work if the "active_tasks" contained one 
task as the MOBIKE task or that was the last one in the list. If there 
were other tasks in the list the exchange would be overwritten. Is this 
intentional that the IKE_MOBIKE is at a lower priority than any other 
valid task in the list ?

Regards
Howard

--
     Howard Windsor.
     Please consider the environment before printing.
A building, like code, is only as strong as its foundations. You
cannot build St Paul's Cathedral from a mud hut merely by adding features.
This message is confidential and may contain privileged information.  If you are not the addressee indicated in this message (or responsible for delivery of the message to them) you may not copy or deliver this message to anyone or take any action in reliance on it.  If you have received this e-mail in error, please delete it and notify the sender as soon as possible.  Alcatel-Lucent does not accept any liability for any harm that may be caused to the recipient's system or data by this message.  Please carry out virus and other such checks as you may consider appropriate.
Alcatel-Lucent Telecom Limited.
Registered Office: Christchurch Way, Greenwich, London SE10 0AG.
Registered in England&    Wales number 02650571







More information about the Dev mailing list