Subject: [OSPF] [OSPFv3- Extended LSAs] Regarding Extended TLV validation procedure for malformed LSAs

From: Veerendranatha Reddy Vallem <[email-masked]>
Date: Mon, 3 Apr 2017 12:54:21 +0000

Dear Authors,
Can you please confirm the actions need to take while validating extended TLVs for malformed extended LSA check while parsing the LSA.
Can you please confirm which case we can discard LSA or in which case we will ignore  TLV, but LSA is consider as valid and processed other TLVs.

S.No            Scenario                                                                                                                              Action
1                     Sum of TLV lengths is more than total LSA body length                                        Discard the LSA by considering malformed packet, no ACK

2                     Sum of TLV lengths is same as total LSA  body length, but                                   Ignore the current TLV and continue to next TLV (or)
                       Sub TLV length/ sum of sub TLV length in one TLV                                                 Discard the LSA by considering malformed packet with  no ACK??
                        exceeds TLV length
3.                    Sum of TLV and sub TLV lengths are  same as total LSA body length
                       But TLV length is not correct as per TLV type
                      (Ex: Router Link TLV has fixed length of 16 bytes, but provided
                       8 bytes data in one  of router Link TLV and TLV length also set as 8 bytes)      Discard the current TLV and continue to next TLV (or)
                                                                                                                                                                  Discard the LSA by considering malformed packet with no ACK??
4.                   Sum of TLV and sub TLV lengths are  same as total LSA body length
                       TLV length is correct as per length of sub TLVs, but sub TLV length is
                       not correct as per sub TLV type
                      (Ex: Adj SID sub TLV has at least fixed length of 8 bytes, but provided
                       4 bytes data in one  of Adj SID sub TLV and sub TLV length also set as 4 bytes)      Discard the current TLV and continue to next TLV (or)
                                                                                                                                                                        Discard the LSA by considering malformed packet with no ACK??

Regards,
Veerendranath

---

From: Acee Lindem <[email-masked]>
Date: Mon, 3 Apr 2017 15:25:57 -0400

Hi Veerendranatha, 

> On Apr 3, 2017, at 8:54 AM, Veerendranatha Reddy Vallem <[email-masked]> wrote:
> 
> Dear Authors,

I’d certainly agree with this. 

>                        Sub TLV length/ sum of sub TLV length in one TLV                                                 Discard the LSA by considering malformed packet with  no ACK??

Unless the correct TLV length is known in advance, I don’t see how you can parse this correctly. I’d consider it a malformed packet. 

>                                                                                                                                                                   Discard the LSA by considering malf…

I’d just log an error in this case but certainly wouldn’t change the LSA content. Depending on the usage, the LSA can be marked as invalid. 

>                                                                                                                                                                         Discard the LSA by considerin…

Same as #3. 

Thanks,
Acee

>  
> Regards,
> Veerendranath
>                       
> _______________________________________________
> OSPF mailing list
> [email-masked] <mailto:[email-masked]>
> https://www.ietf.org/mailman/listinfo/ospf <https://www.ietf.org/mailman/listinfo/ospf>