Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1699 +/- ##
==========================================
- Coverage 83.21% 83.20% -0.01%
==========================================
Files 282 282
Lines 48719 48721 +2
Branches 10547 10317 -230
==========================================
- Hits 40540 40539 -1
+ Misses 7052 7043 -9
- Partials 1127 1139 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
@aled-ua could you check why the CI failed? |
Contributor
Author
|
emmm, I'm not sure. Looks like the download failed? |
seladb
reviewed
Mar 20, 2025
seladb
approved these changes
Mar 30, 2025
Owner
|
Thank you @oss-patch for making this fix! |
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.
[Warning] This PR is generated by AI
PR Title: Fix for Heap-Buffer-Overflow Vulnerability in PcapPlusPlus - OSV-2024-947
PR Description:
pcpp::SomeIpSdLayer::getEntries()when attempting to create newSomeIpSdEntryobjects without properly checking if sufficient memory is available in the buffer. This leads to access beyond the allocated memory, causing a heap-buffer-overflow.getEntriesfunction to ensure the remaining buffer length is adequate before creating a newSomeIpSdEntryobject. If the length is insufficient, the loop terminates, preventing out-of-bounds access. This fix enhances the program's security and stability by preventing invalid memory access.Sanitizer Report Summary: The AddressSanitizer report identified a heap-buffer-overflow when the program attempted to access 1 byte beyond a 66-byte allocated buffer. The issue occurs in
pcpp::SomeIpSdEntry::SomeIpSdEntryand is triggered via thepcpp::SomeIpSdLayer::getEntries()function. The root cause is the lack of a bounds check before creating a newSomeIpSdEntryobject.Full Sanitizer Report:
Files Modified:
Packet++/src/SomeIpSdLayer.cppPatch Validation: The patch has been validated using the provided PoC, and the heap-buffer-overflow vulnerability has been resolved. No new issues have been introduced.
Links: