]> git.puffer.fish Git - matthieu/frr.git/commit
isisd: fix router capability TLV parsing issues
authorJuraj Vijtiuk <juraj.vijtiuk@sartura.hr>
Wed, 13 Oct 2021 16:32:53 +0000 (18:32 +0200)
committermergify-bot <noreply@mergify.com>
Wed, 9 Feb 2022 10:49:32 +0000 (10:49 +0000)
commit89a12381327b5f42c3905e6ee4a87f7a3f3ef3b5
tree4b17c3a5155f3b72b312fcc8152795112300d56c
parente3e7df1d3556796a39f110110536ff0d7a542374
isisd: fix router capability TLV parsing issues

isis_tlvs.c would fail at multiple places if incorrect TLVs were
received causing stream assertion violations.
This patch fixes the issues by adding missing length checks, missing
consumed length updates and handling malformed Segment Routing subTLVs.

Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk@sartura.hr>
Small adjustments by Igor Ryzhov:
- fix incorrect replacement of srgb by srlb on lines 3052 and 3054
- add length check for ISIS_SUBTLV_ALGORITHM
- fix conflict in fuzzing data during rebase

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 9ba865f54d331c550629304cb25e77ac81455803)
isisd/isis_tlvs.c
isisd/isis_tlvs.h
tests/isisd/test_fuzz_isis_tlv_tests.h.gz