mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:49:18 +00:00
zebra: fix fpm netlink encode out of bounds read
Don't attempt to encode the pointer address instead pass the pointer directly so the real contents can be accessed. (`ri->pref_src` type is `union g_addr *`) Found by Coverity Scan (CID 1482162) Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
405227b519
commit
18b7958e47
@ -511,7 +511,7 @@ static int netlink_route_info_encode(struct netlink_route_info *ri,
|
|||||||
done:
|
done:
|
||||||
|
|
||||||
if (ri->pref_src) {
|
if (ri->pref_src) {
|
||||||
nl_attr_put(&req->n, in_buf_len, RTA_PREFSRC, &ri->pref_src,
|
nl_attr_put(&req->n, in_buf_len, RTA_PREFSRC, ri->pref_src,
|
||||||
bytelen);
|
bytelen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user