Skip to content

Fix ospf checksum #20706 (backport #20729)#20841

Merged
Jafaral merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-20729
Feb 14, 2026
Merged

Fix ospf checksum #20706 (backport #20729)#20841
Jafaral merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-20729

Conversation

@mergify
Copy link

@mergify mergify bot commented Feb 14, 2026

The Issue: Currently, ospf_lsa_checksum_valid does not explicitly reject LSAs where the checksum field is 0x0000. In OSPF, the checksum calculation is mandatory and the value zero is reserved to indicate a checksum failure. Because Fletcher-16 uses ones-complement arithmetic, 0x0000 and 0xFFFF are mathematically equivalent, which could allow corrupted LSAs to bypass validation if the checksum field is tampered with or corrupted to 0x0000.

The Fix: Added a guard clause in ospf_lsa_checksum_valid to immediately return 0 (invalid) if lsa->checksum == 0.

Fix #20706


This is an automatic backport of pull request #20729 done by Mergify.

Discard LSAs with a zero checksum value to prevent invalid LSAs from being accepted into the LSDB.

Signed-off-by: kartikohlan <kartik7ohlan@gmail.com>
(cherry picked from commit c29b9ed)
@mergify mergify bot mentioned this pull request Feb 14, 2026
@greptile-apps
Copy link

greptile-apps bot commented Feb 14, 2026

Target branch is not in the allowed branches list.

@frrbot frrbot bot added the ospf label Feb 14, 2026
@Jafaral Jafaral merged commit e643d70 into stable/10.5 Feb 14, 2026
21 checks passed
@mergify mergify bot deleted the mergify/bp/stable/10.5/pr-20729 branch February 14, 2026 16:58
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.

2 participants