Skip to content

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Nov 26, 2024

This fixes couple of DNS parsing issues. There are also tests created to catch these when applicable.

Fixes #82139

If the packet parsing fails in dns_unpack_response_query(), then
do not continue further but bail out early.

Signed-off-by: Jukka Rissanen <[email protected]>
Make sure we test malformed packet parsing.

Signed-off-by: Jukka Rissanen <[email protected]>
Make sure that when copying the qname, the source buffer is large
enough for the data.

Signed-off-by: Jukka Rissanen <[email protected]>
The dns_unpack_answer() did not check the length of the message
properly which can cause out of bounds read.

Signed-off-by: Jukka Rissanen <[email protected]>
Make sure we catch invalid answer during parsing.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar jukkar force-pushed the fix/dns-parsing-issues branch from a497464 to 40f7359 Compare November 26, 2024 16:07
@jukkar jukkar added backport v2.7-branch backport v3.7-branch Request backport to the v3.7-branch backport v4.0-branch Backport to the v4.0-branch labels Nov 26, 2024
@jukkar jukkar mentioned this pull request Nov 27, 2024
@kartben kartben merged commit 16669ec into zephyrproject-rtos:main Nov 28, 2024
32 checks passed
@jukkar jukkar deleted the fix/dns-parsing-issues branch December 2, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking backport v3.7-branch Request backport to the v3.7-branch backport v4.0-branch Backport to the v4.0-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS parsing errors
5 participants