-
Notifications
You must be signed in to change notification settings - Fork 721
Add boundary checks to prevent memory safety issues in BgpLayer::getHeaderLen #1954
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
seladb
merged 14 commits into
seladb:dev
from
danasana:bugfix/bgp-headerlen-memory-safety
Oct 16, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8dd055c
Add boundary checks to prevent out-of-bounds access in BgpLayer::getH…
danasana 673f255
Add poc files to regression_samples
danasana a975808
Move common validation before branch point to avoid redundancy
danasana 6b979b7
Change C-style casts to static_cast
danasana 1423ba7
Remove mistakenly added files
danasana 45f54c9
Add check to ensure offsetInLayer is not negative in Layer::extend/sh…
danasana b5203a3
Fix pre-commit hook failures
danasana 646610c
Move headerLen calculation and dataPtr bounds check
danasana e9d3792
Relocate shortenLayer/extendLayer validity checks from Layer.cpp to B…
danasana 757fe2e
Fix log messages in BgpLayer.cpp
danasana ad4e2b6
Fix formatting issues
danasana 1b556ab
Remove commented-out line
danasana 3e72319
Move number of bytes to shorten check before m_Packet == nullptr check
danasana 0f3fc26
Move shortenLayer/extendLayer validity checks to BgpLayer::extendLaye…
danasana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Binary file added
BIN
+624 Bytes
...Tests/regression_samples/047c56c3504ad04232497c903af06c0bc4b5c6f73927ad07cde79cfa28d94f8b
Binary file not shown.
Binary file added
BIN
+1.61 KB
...Tests/regression_samples/1eb005b8d62599b6561acf7e778f51603ccbc5ddf948c0b081617668bb56cee4
Binary file not shown.
Binary file added
BIN
+444 Bytes
...Tests/regression_samples/39d92632b6a92f1c682c052febfbc74b0561536687be3b7ce7b9508e8b9726d6
Binary file not shown.
Binary file added
BIN
+624 Bytes
...Tests/regression_samples/6f6fd63a9a6d8dd1a206eff00c915ed4b643034dad7e9986fd89a43244d6be97
Binary file not shown.
Binary file added
BIN
+624 Bytes
...Tests/regression_samples/6fda21d7ebaa0391434f17eecf25b1d7c58633f96b6906183c626cbdfc35b325
Binary file not shown.
Binary file added
BIN
+624 Bytes
...Tests/regression_samples/a7a658b6e51576eafe7990dbc35c5bfff991d914c9ead914e26e3bfc3e88221c
Binary file not shown.
Binary file added
BIN
+444 Bytes
...Tests/regression_samples/adb739b5829aacedbec6cf3969413997d23b6f2e3350ddf0b1cc3b4d1c335a95
Binary file not shown.
Binary file added
BIN
+444 Bytes
...Tests/regression_samples/e0c0f8fea6e931d9671384a66f4e1ab02d84e27a5f091e9c7b1fce89d9c18837
Binary file not shown.
Binary file added
BIN
+444 Bytes
...Tests/regression_samples/ec4b17a4e7b994548f03ae05d8d8924a515a236892959f3300e1c9e8a9c56ba7
Binary file not shown.
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.
Uh oh!
There was an error while loading. Please reload this page.