ospfd: Solved crash in OSPF TE parsing - #15431
Merged
Merged
Conversation
ton31337
approved these changes
Feb 27, 2024
Member
|
@Mergifyio backport dev/10.0 stable/9.1 stable/9.0 |
✅ Backports have been createdDetails
|
sri-mohan1
reviewed
Feb 27, 2024
| ote_debug(" |- Found no valid TE Link local address. Abort!"); | ||
| return -1; | ||
| } | ||
| edge = get_edge(ted, attr.adv, attr.standard.local); |
Contributor
There was a problem hiding this comment.
can we validate the "edge" instead of the above added check?
Member
Author
There was a problem hiding this comment.
No. In fact, the edge structure is correctly created. But, the unique identifier of the edge in the TED is based on the local address. Thus, if the local address is IPV4_NET0 (i.e. 0.0.0.0) we cannot correctly reference the edge in the TED. However, local ID is also a valid identifier. So, I need to check that both local address and local ID have not been found during TE parsing. I'll update the PR accordingly.
Iggy Frankovic discovered an ospfd crash when perfomring fuzzing of OSPF LSA packets. The crash occurs in ospf_te_parse_te() function when attemping to create corresponding egde from TE Link parameters. If there is no local address, an edge is created but without any attributes. During parsing, the function try to access to this attribute fields which has not been created causing an ospfd crash. The patch simply check if the te parser has found a valid local address. If not found, we stop the parser which avoid the crash. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
This was referenced Feb 27, 2024
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
ospfd: Solved crash in OSPF TE parsing (backport #15431)
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
ospfd: Solved crash in OSPF TE parsing (backport #15431)
riw777
added a commit
that referenced
this pull request
Feb 27, 2024
ospfd: Solved crash in OSPF TE parsing (backport #15431)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Iggy Frankovic discovered an ospfd crash when perfomring fuzzing of OSPF LSA packets. The crash occurs in ospf_te_parse_te() function when attemping to create corresponding egde from TE Link parameters. If there is no local address, an edge is created but without any attributes. During parsing, the function try to access to this attribute fields which has not been created causing an ospfd crash.
The patch simply check if the te parser has found a valid local address. If not found, we stop the parser which avoid the crash.