Skip to content
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

gnrc_ipv6: fix SEGFAULT when multicasting with multiple interfaces [backport 2019.10] #12521

Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Oct 21, 2019

Backport of #12512

Contribution description

When writing to the IPv6 header the implementation currently doesn't take the packet with the (potentially) duplicated header, but the packet with the original one, which leads to the packet sent and then released in gnrc_netif_ethernet.c first and then accessed again in further iterations of the "writing to the IPv6 header" loop, which causes access to an invalid pointer, causing a crash.

Testing procedure

When repeating the "Steps to reproduce" in #11980, the node should not crash and you get a lot of (duplicate) replies. When using two interfaces with one being a 6LoWPAN interface, the node should not crash, pinging might however not work due to the bug fixed in #10499.

Issues/PRs references

Fixes #11980

@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 Oct 21, 2019
@miri64 miri64 added this to the Release 2019.10 milestone Oct 21, 2019
@kb2ma kb2ma self-requested a review October 21, 2019 09:48
@miri64
Copy link
Member Author

miri64 commented Oct 21, 2019

#12524 is already ACK'd and just waiting for Murdock. So I wait for that to be merged before I rebase.

@kb2ma
Copy link
Member

kb2ma commented Oct 21, 2019

OK, thanks for that comment. I'll review the commit, but wait for the rebase.

When writing to the IPv6 header the implementation currently doesn't
take the packet with the (potentially) duplicated header, but the
packet with the original one, which leads to the packet sent and then
released in `gnrc_netif_ethernet.c` first and then accessed again in
further iterations of the "writing to the IPv6 header" loop, which
causes access to an invalid pointer, causing a crash.

Fixes RIOT-OS#11980

(cherry picked from commit ce14ee1)
@miri64 miri64 force-pushed the backport/2019.10/gnrc_ipv6/fix/i11980 branch from 288b75f to e95bb17 Compare October 21, 2019 10:10
@miri64
Copy link
Member Author

miri64 commented Oct 21, 2019

Rebased to current release branch

@kb2ma
Copy link
Member

kb2ma commented Oct 21, 2019

ACK. Commits identical and link-local multicast ping works on native.

@kb2ma kb2ma merged commit cbee3e7 into RIOT-OS:2019.10-branch Oct 21, 2019
@miri64 miri64 deleted the backport/2019.10/gnrc_ipv6/fix/i11980 branch October 21, 2019 11:15
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.

2 participants