]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Link State memory corruption
authorOlivier Dugeon <olivier.dugeon@orange.com>
Fri, 21 Apr 2023 16:09:28 +0000 (18:09 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 9 May 2023 10:03:43 +0000 (13:03 +0300)
commit719b26901c1c99957c87ee99d079bcb0d43760ca
tree6678ccf840c1a13de97801db6dff5c9754159195
parent3b8686f64c203050f2c3554b7ac8a896ee44cde9
lib: Link State memory corruption

In function ls_find_subnet(), prefix argument is directly copied into
subnet.key structure to find corresponding subnet in RB Tree. This could leadr
to a memory corruption. Function prefix_copy() must be used instead.

This patch replaces the direct prefix copy by a call to prefix_copy() function
to avoid this memory issue.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
lib/link_state.c