From 5fda523bc07cf813cdff725f769eeac92b2de2f2 Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 14 Sep 2026 17:42:08 +0000 Subject: [PATCH] Ensure OSPF header length is reasonable --- nselib/ospf.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nselib/ospf.lua b/nselib/ospf.lua index 302079caa..b6f85d208 100644 --- a/nselib/ospf.lua +++ b/nselib/ospf.lua @@ -248,6 +248,7 @@ OSPF = { local pos = 1 lsa_h.age, lsa_h.options, lsa_h.type, lsa_h.id, lsa_h.adv_router, lsa_h.sequence, lsa_h.checksum, lsa_h.length, pos = string.unpack(">I2 BB I4 I4 c4 c2 I2", data, pos) + assert(lsa_h.length >= 20) lsa_h.id = ipOps.fromdword(lsa_h.id) lsa_h.adv_router = ipOps.fromdword(lsa_h.adv_router)