mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-04 11:10:33 +00:00
ospf6d: Prevent heap-buffer-overflow with unknown type
When parsing a osf6 grace lsa field and we receive an
unknown tlv type, ospf6d was not incrementing the pointer
to get beyond the tlv. Leaving a situation where ospf6d
would parse the packet incorrectly.
Signed-off-by: Iggy Frankovic <iggy07@gmail.com>
(cherry picked from commit 826f2510e6
)
This commit is contained in:
parent
d3aead43ef
commit
359892fada
@ -176,6 +176,7 @@ static int ospf6_extract_grace_lsa_fields(struct ospf6_lsa *lsa,
|
|||||||
return OSPF6_FAILURE;
|
return OSPF6_FAILURE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
sum += TLV_SIZE(tlvh);
|
||||||
if (IS_DEBUG_OSPF6_GR)
|
if (IS_DEBUG_OSPF6_GR)
|
||||||
zlog_debug("%s, Ignoring unknown TLV type:%d",
|
zlog_debug("%s, Ignoring unknown TLV type:%d",
|
||||||
__func__, ntohs(tlvh->type));
|
__func__, ntohs(tlvh->type));
|
||||||
|
Loading…
Reference in New Issue
Block a user