sock_dns: fix out-of-bound errors [backport 2018.10]#10757
sock_dns: fix out-of-bound errors [backport 2018.10]#10757jia200x merged 3 commits intoRIOT-OS:2018.10-branchfrom
Conversation
|
The code is identical to #10740, so only testing should be required. |
|
tests/gnrc_sock_dns still working. ACK. |
|
We have a problem, though: the release branch doesn't build with our current docker image, thus CI doesn't pass. |
|
Dafuq? |
Well, that's how interpret the unrelated Murdock errors. |
|
#10759 was merged. Please rebase. |
Fixes RIOT-OS#10739 (cherry picked from commit 2840b38)
(cherry picked from commit 8ad5e44)
(cherry picked from commit 894ad29)
520a9e8 to
a8af1cc
Compare
|
Rebased to current |
|
@kaspar030 Re-ACK? |
|
As suspected in #10765 Travis still isn't able to build. |
|
@jia200x could you review? |
|
yes, sure |
|
Should we close this, now that 2019.01 is imminent? |
If we can ignore Travis output, I can test it now and merge |
We basically have to, since we would have to backport #10765 for that. Since Travis is performing the same checks as Murdock does, this seems unnecessary to me. |
|
I was not able to reproduce the crash on my machine, but I think it's because of my local setup. The fix is evident and the patch is the same as in #10740. So, let's merge it |
|
So now we can publish |
Backport of #10740
Contribution description
Fixes #10739
Testing procedure
I compiled
tests/gnrc_sock_dnswith the following patch:flashed a
samr21-xpro(alternativelypba-d-01-kw2xas described in #10739 is also possible), and connected an ethos terminal to the nodeI reset the node to get its link-local address for later.
Then I started a RADVD with the following config:
and reconfigured the correct route to the host (the preconfigured route by
start_network.shdoes not work, since uhcpc is not available on the node):sudo ip route del affe:abe::/64 sudo ip route add affe:abe::/64 via "<link-local address of node>" dev tap0Then I start the exploit script described in #10739 (or provided by https://github.com/beduino-project/exploit-riot-dns) and reset the node again to start the test. Without this PR the node will crash (note that the exploit described in #10739 does not work but only crashes the node since due to the usage of
ethosthe binary is different), withit it will just reporterror resolving example.org.I also tested expected operation as described in the application's README.
Issues/PRs references
Fixes #10739.