Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ospfd: Solved crash in RI parsing with OSPF TE (backport #15674) #16096

Merged

Conversation

ton31337
Copy link
Member

odd22 and others added 3 commits May 28, 2024 17:40
During fuzzing, Iggy Frankovic discovered that get_edge() function in ospf_te.c
could return null pointer, in particular when the link_id or advertised router
IP addresses are fuzzed. As the null pointer returned by get_edge() function is
not handlei by calling functions, this could cause ospfd crash.

This patch introduces new verification of returned pointer by get_edge()
function and stop the processing in case of null pointer. In addition, link ID
and advertiser router ID are validated before calling ls_find_edge_by_key() to
avoid the creation of a new edge with an invalid key.

CVE-2024-34088

Co-authored-by: Iggy Frankovic <[email protected]>
Signed-off-by: Olivier Dugeon <[email protected]>
Iggy Frankovic discovered another ospfd crash when performing fuzzing of OSPF
LSA packets. The crash occurs in ospf_te_parse_ext_link() function when
attemping to read Segment Routing Adjacency SID subTLVs. The original code
doesn't check if the size of the Extended Link TLVs and subTLVs have the correct
length. In presence of erronous LSA, this will cause a buffer overflow and ospfd
crashes.

This patch introduces new verification of the subTLVs size for Extended Link
TLVs and subTLVs. Similar check has been also introduced for the Extended
Prefix TLV.

Co-authored-by: Iggy Frankovic <[email protected]>
Signed-off-by: Olivier Dugeon <[email protected]>
Iggy Frankovic discovered another ospfd crash when performing fuzzing of OSPF
LSA packets. The crash occurs in ospf_te_parse_ri() function when attemping to
read Segment Routing subTLVs. The original code doesn't check if the size of
the SR subTLVs have the correct length. In presence of erronous LSA, this will
cause a buffer overflow and ospfd crash.

This patch introduces new verification of the subTLVs size for Router
Information TLV.

Co-authored-by: Iggy Frankovic <[email protected]>
Signed-off-by: Olivier Dugeon <[email protected]>
@frrbot frrbot bot added the ospf label May 28, 2024
@Jafaral Jafaral changed the title Recent CVE-related OSPF backports for 8.5 ospfd: Solved crash in RI parsing with OSPF TE [backport #15674 ] May 28, 2024
@Jafaral Jafaral changed the title ospfd: Solved crash in RI parsing with OSPF TE [backport #15674 ] ospfd: Solved crash in RI parsing with OSPF TE [backport #15674] May 28, 2024
@Jafaral Jafaral changed the title ospfd: Solved crash in RI parsing with OSPF TE [backport #15674] ospfd: Solved crash in RI parsing with OSPF TE (backport #15674) May 28, 2024
@donaldsharp donaldsharp merged commit 07bd3ee into FRRouting:stable/8.5 May 29, 2024
8 of 9 checks passed
@ton31337 ton31337 deleted the fix/backport_pr_15674_8.5 branch May 29, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants