Merge pull request #16111 from donaldsharp/ospfv3_read_after

ospf6d: Prevent heap-buffer-overflow with unknown type
This commit is contained in:
Jafar Al-Gharaibeh 2024-05-31 10:09:24 -05:00 committed by GitHub
commit cdc964c233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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));