Merged
Conversation
f1bdcb2 to
caa0eb1
Compare
That's why we can't cast it into sockaddr_in. Here we read the proper amount of bytes.
2d33977 to
b29ed9b
Compare
We had almost same sockaddr reading code in luomu-getifaddr and luomu-libpcap. Now both places use shared code from luomu-common. The code is behind "libc" feature flag because it requires libc as external dependency and we want to keep luomu-common as dependency free by default.
b29ed9b to
78f710b
Compare
jtt
approved these changes
Mar 13, 2026
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.
Fixes CVE-2025-11961.
This PR also fixes heap buffer over read that happened when reading netmask from
sockaddr_instruct in macOS. In macOS thesockaddr_instruct contains only as many bytes as required to store netmask. Empirical evidence showssockaddr_in'ssin_lenis between 5 to 8 in this scenario.This issue surfaced due to change in
libpcap(the-tcpdump-group/libpcap@be85331) and testing the code with LLVM's AddressSanitizer.