-
Notifications
You must be signed in to change notification settings - Fork 684
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
Fix vuln OSV-2024-947 #1699
base: dev
Are you sure you want to change the base?
Fix vuln OSV-2024-947 #1699
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1699 +/- ##
==========================================
- Coverage 83.10% 83.10% -0.01%
==========================================
Files 277 277
Lines 48201 48203 +2
Branches 9955 9974 +19
==========================================
Hits 40058 40058
+ Misses 7264 7262 -2
- Partials 879 883 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@aled-ua could you check why the CI failed? |
emmm, I'm not sure. Looks like the download failed?
|
[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 newSomeIpSdEntry
objects without properly checking if sufficient memory is available in the buffer. This leads to access beyond the allocated memory, causing a heap-buffer-overflow.getEntries
function to ensure the remaining buffer length is adequate before creating a newSomeIpSdEntry
object. 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::SomeIpSdEntry
and is triggered via thepcpp::SomeIpSdLayer::getEntries()
function. The root cause is the lack of a bounds check before creating a newSomeIpSdEntry
object.Full Sanitizer Report:
Files Modified:
Packet++/src/SomeIpSdLayer.cpp
Patch 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: