Skip to content

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Aug 25, 2020

There is also a commit that tries to verify that we catch all the fixed issues.

@jukkar jukkar requested review from d3zd3z and ceolin August 25, 2020 13:45
@github-actions github-actions bot added the area: Tests Issues related to a particular existing or missing test label Aug 25, 2020
jukkar added 6 commits August 26, 2020 09:12
This is not possible with valid DNS messages but is possible if
we receive malformed DNS packet.

Signed-off-by: Jukka Rissanen <[email protected]>
Make sure that IP address information is found in the received
message.

Signed-off-by: Jukka Rissanen <[email protected]>
As the answer might not be compressed, calculate next answer
position correctly.

Signed-off-by: Jukka Rissanen <[email protected]>
The ANCOUNT has nothing to do with label count so remove the
original while loop and just go through all the labels until
we have read all of them.

Signed-off-by: Jukka Rissanen <[email protected]>
The DNS message must be long enough for id and flags fields.

Signed-off-by: Jukka Rissanen <[email protected]>
Add more tests to verify that we discard malformed packets.
In order to simplify the testing, separate message validation to
dns_validate_msg() function in resolve.c. Allow that function to
be called from unit test. This way we can construct invalid DNS
messages in unit test and verify that they are discarded when
needed.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar jukkar force-pushed the dns-validate-response branch from 440e717 to a2a4436 Compare August 26, 2020 06:12
@jukkar jukkar added this to the v2.4.0 milestone Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants