mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:33:56 +00:00
Merge pull request #16213 from opensourcerouting/fix/fqdn_capability_parsing_for_dynamic_capability
bgpd: Check if we have really enough data before doing memcpy for FQDN capability
This commit is contained in:
commit
ed5628fef1
@ -3438,7 +3438,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = *data;
|
len = *data;
|
||||||
if (data + len > end) {
|
if (data + len + 1 > end) {
|
||||||
zlog_err("%pBP: Received invalid FQDN capability length (host name) %d",
|
zlog_err("%pBP: Received invalid FQDN capability length (host name) %d",
|
||||||
peer, hdr->length);
|
peer, hdr->length);
|
||||||
return;
|
return;
|
||||||
@ -3469,7 +3469,7 @@ static void bgp_dynamic_capability_fqdn(uint8_t *pnt, int action,
|
|||||||
|
|
||||||
/* domainname */
|
/* domainname */
|
||||||
len = *data;
|
len = *data;
|
||||||
if (data + len > end) {
|
if (data + len + 1 > end) {
|
||||||
zlog_err("%pBP: Received invalid FQDN capability length (domain name) %d",
|
zlog_err("%pBP: Received invalid FQDN capability length (domain name) %d",
|
||||||
peer, len);
|
peer, len);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user