Skip to content

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Feb 5, 2019

Backport of #10950

Contribution description

When either gnrc_sixlowpan_iphc_nhc or gnrc_udp is not compiled in _compressible() never returns true. This causes the dispatch snip in gnrc_sixlowpan_iphc_send() to be of length 0, meaning dispatch->data is NULL, causing possible crashes when trying to send IPv6 packets over 6LoWPAN without NHC or UDP.

Testing procedure

tests/gnrc_tcp_server and tests/gnrc_tcp_client should work on a 6Lo-based board.
examples/gnrc_networking should still be able to exchange UDP packets. Those packets should be compressed with NHC (check with sniffer).

Issues/PRs references

Fixes #10947

When either `gnrc_sixlowpan_iphc_nhc` or `gnrc_udp` is not compiled
in `_compressible()` never returns `true`. This causes the
`dispatch` snip in `gnrc_sixlowpan_iphc_send()` to be of length 0,
meaning `dispatch->data` is `NULL`, causing possible crashes when
trying to send IPv6 packets over 6LoWPAN without NHC or UDP.

(cherry picked from commit 43c2c72)
@miri64 miri64 added Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Feb 5, 2019
@miri64 miri64 requested a review from PeterKietzmann February 5, 2019 18:20
@miri64 miri64 requested a review from aabadie February 5, 2019 18:22
@miri64 miri64 added this to the Release 2019.01 milestone Feb 5, 2019
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. @aabadie is it okay to merge into release branch right now?

@miri64
Copy link
Member Author

miri64 commented Feb 6, 2019

ACK. @aabadie is it okay to merge into release branch right now?

Is there a bug freeze on the release I am not aware of?

@aabadie
Copy link
Contributor

aabadie commented Feb 8, 2019

Let's merge this PR. As a consequence, we will need a RC3.

@aabadie aabadie merged commit a67fcf6 into RIOT-OS:2019.01-branch Feb 8, 2019
@miri64 miri64 deleted the backport/2019.01/gnrc_sixlowpan_iphc/fix/compressible branch February 8, 2019 11:06
@miri64
Copy link
Member Author

miri64 commented Feb 8, 2019

Let's merge this PR. As a consequence, we will need a RC3.

Yepp, I suggest we wait for the merge of the missing backports (and possibly my bugfix for the issue you found in RC2 with native) and then go to RC3 immediately (no need to finish all tests for RC2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants