ikev1: Properly initialize list of fragments in case fragment ID is 0
authorVolker RĂ¼melin <vr_strongswan@t-online.de>
Fri, 11 Oct 2013 07:38:24 +0000 (09:38 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 31 Oct 2013 20:58:42 +0000 (21:58 +0100)
Fixes CVE-2013-6076.

src/libcharon/sa/ikev1/task_manager_v1.c

index 6d4ef14..597416e 100644 (file)
@@ -1273,7 +1273,7 @@ static status_t handle_fragment(private_task_manager_t *this, message_t *msg)
                return FAILED;
        }
 
-       if (this->frag.id != payload->get_id(payload))
+       if (!this->frag.list || this->frag.id != payload->get_id(payload))
        {
                clear_fragments(this, payload->get_id(payload));
                this->frag.list = linked_list_create();