net/sixlowpan: Check if g_frame_hdrlen + IPv6_HDRLEN <= iob->io_len#18857
Open
acassis wants to merge 2 commits intoapache:masterfrom
Open
net/sixlowpan: Check if g_frame_hdrlen + IPv6_HDRLEN <= iob->io_len#18857acassis wants to merge 2 commits intoapache:masterfrom
acassis wants to merge 2 commits intoapache:masterfrom
Conversation
This commit checks if the incoming 6LoWPAN frame header len + the IPv6_HDRLEN will fit inside the b->io_len. Signed-off-by: Alan C. Assis <acassis@gmail.com>
b2c58db to
10cfc96
Compare
cederom
approved these changes
May 8, 2026
Contributor
Author
|
@cederom endofframe is where the received data ends, so the test verifies if this position is lesser than the header len. It is confuse to understand if you don't spend some time looking the code |
There was another small issue on sixlowpan_input.c code, it was processing protosize and 8-bit instead of 16-bit. It was working because the max tcp->tcpoffset was 0xf0, so protosize = ((uint16_t)tcp->tcpoffset >> 4) << 2; Will be protosize = 15 * 4 = 60 and will fit inside 8-bit. Signed-off-by: Alan C. Assis <acassis@gmail.com>
10cfc96 to
2f58087
Compare
linguini1
approved these changes
May 8, 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.
Summary
Fix another issue where g_frame_hdrlen is not checked correctly
Impact
Improvement
Testing
$ ./tools/configure.sh b-l475e-iot01a:spirit-6lowpan