Skip to content

Fix overflow for /0 #323

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Fix overflow for /0 #323

merged 1 commit into from
Apr 11, 2025

Conversation

Koenvh1
Copy link
Contributor

@Koenvh1 Koenvh1 commented Feb 13, 2025

Previously it would make a prefix, add that to the start, and check whether the end is still smaller than the starting address. This can lead to situations where e.g. 0.0.0.0 - 255.255.255.255 would overflow, as it would try to go up to 256.0.0.0, which the u32 cannot contain.

These changes add a check for the last address to fix that.

(Relates to NLnetLabs/krill#1251)

@Koenvh1 Koenvh1 requested a review from partim February 13, 2025 11:51
@partim partim merged commit 2cd54e3 into main Apr 11, 2025
24 checks passed
@partim partim deleted the fix-all-resources branch April 11, 2025 13:17
partim added a commit that referenced this pull request Apr 23, 2025
New

* Added support for ASPA to SLURM. ([#325], [#329])

Bug fixes

* Fix access to flags in the ASPA and router key RTR PDUs. ([#327])
* Fix reported version in EndOfData RTR PDUs. ([#328])
* Fix an overflow in `AddressRange::to_vX_prefixes` for prefix length 0.
  ([#323])

Other changes

* The minimum supported Rust version is now 1.81. ([#326])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants