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

[Backport v3.7-branch] DNS parsing issues #82288

Open
wants to merge 5 commits into
base: v3.7-branch
Choose a base branch
from

Commits on Nov 28, 2024

  1. net: dns: Check parsing error properly for response

    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]>
    (cherry picked from commit eb2550a)
    jukkar authored and github-actions[bot] committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    8ccd368 View commit details
    Browse the repository at this point in the history
  2. tests: net: dns: Add checking of malformed packet

    Make sure we test malformed packet parsing.
    
    Signed-off-by: Jukka Rissanen <[email protected]>
    (cherry picked from commit 6f96915)
    jukkar authored and github-actions[bot] committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    ea25a91 View commit details
    Browse the repository at this point in the history
  3. net: dns: Validate source buffer length properly

    Make sure that when copying the qname, the source buffer is large
    enough for the data.
    
    Signed-off-by: Jukka Rissanen <[email protected]>
    (cherry picked from commit 43c2b9c)
    jukkar authored and github-actions[bot] committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    9d3e5e5 View commit details
    Browse the repository at this point in the history
  4. net: dns: Check DNS answer properly

    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]>
    (cherry picked from commit 6e7fcff)
    jukkar authored and github-actions[bot] committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    161806d View commit details
    Browse the repository at this point in the history
  5. tests: net: dns: Add test for invalid DNS answer parsing

    Make sure we catch invalid answer during parsing.
    
    Signed-off-by: Jukka Rissanen <[email protected]>
    (cherry picked from commit 16669ec)
    jukkar authored and github-actions[bot] committed Nov 28, 2024
    Configuration menu
    Copy the full SHA
    a2af9cf View commit details
    Browse the repository at this point in the history