-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_icmpv6_echo: avoid crashing when pktbuf full #10869
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
Conversation
Once the packet buffer is full on heavy network load, gnrc_netif_hdr_build may return NULL. In that case, the following unchecked access to hdr->data leads to a crash.
With for _ in $(seq 10); do sudo ping6 fe80::b41f:ceff:febe:78d3%tapbr0 -s1452 -i0 -c 100000 & done or for _ in $(seq 10); do sudo ping6 fe80::b41f:ceff:febe:78d3%tapbr0 -s1452 -f -c 100000 & done mostly without problems). So I can't really test. However |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes make sense ACK
Please provide a backport to the 2019.01-branch (You can use the script in #8968 for that if you want to). |
When bombarding
in 4 terminals, it crashes with
Where can I find the core file to take a look why it crashed? |
I had the same question for a while. On systemd systems, it is probably in |
I usually compile native with |
Thanks. I'm using UNIX/Linux since 25 years, |
Contribution description
This PR fixes the unchecked access to
(gnrc_netif_hdr_t *)hdr->data
wherehdr
is returned fromgnrc_netif_hdr_build
. If packet buffer is full,gnrc_netif_hdr_build
may returnNULL
. The following unchecked access to the pointer can then lead to a crash.Testing procedure
Produce a lot of network traffic using ping command with maximum data size and an intervall of 0, if necessary from multiple terminals so that the packet buffer becomes full, e.g.
This test should not lead to a crash.
Issues/PRs references
Problem was found during testing PR #10862 and described in issue #10861.