]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: CVE-2011-3326 (uknown LSA type segfault)
authorCROSS <info@codenomicon.com>
Mon, 26 Sep 2011 09:17:21 +0000 (13:17 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 26 Sep 2011 14:46:28 +0000 (18:46 +0400)
This vulnerability (CERT-FI #514837) was reported by CROSS project.
They have also suggested a fix to the problem, which was found
acceptable.

Quagga ospfd does not seem to handle unknown LSA types in a Link State
Update message correctly. If LSA type is something else than one
supported
by Quagga, the default handling of unknown types leads to an error.

* ospf_flood.c
  * ospf_flood(): check return value of ospf_lsa_install()

ospfd/ospf_flood.c

index 77f2e161127a85cc77f42202c14cf452c437f0d0..004ed1a77ab667e9711c97c434fe1d2518a9bb75 100644 (file)
@@ -319,7 +319,8 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr,
      procedure cannot overwrite the newly installed LSA until
      MinLSArrival seconds have elapsed. */  
 
-  new = ospf_lsa_install (ospf, nbr->oi, new);
+  if (! (new = ospf_lsa_install (ospf, nbr->oi, new)))
+    return 0; /* unknown LSA type */
 
   /* Acknowledge the receipt of the LSA by sending a Link State
      Acknowledgment packet back out the receiving interface. */