Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Nov 21, 2025

Backport 7a9ca8e~2..7a9ca8e from #99683.

Fixes #99682

As the loop unpacking the DNS name from records checks the current
label length on each iteration, it's also needed to update the remaining
buffer length on each iteration, otherwise the buffer length checks
doesn't work as expected.

Additionally, the remaining buffer checks while technically worked, they
were conceptually wrong and unintuitive. The buf->data pointer doesn't
move, so comparing against this pointer when adding new labels doesn't
make sense. It's more intuitive to simply compare the label size vs
the remaining buffer space.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 7bd45cd)
Verify that dns_unpack_name() generates a valid DNS name when unpacking
records and that it returns an error in case of overflow.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 7a9ca8e)
@github-actions github-actions bot added the Backport Backport PR and backport failure issues label Nov 21, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Nov 21, 2025
@JarmouniA JarmouniA closed this Nov 22, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Backports Nov 22, 2025
@JarmouniA JarmouniA reopened this Nov 22, 2025
@github-project-automation github-project-automation bot moved this from Done to Needs more info in Backports Nov 22, 2025
@JarmouniA JarmouniA added this to the v4.3.1 milestone Nov 22, 2025
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Nov 22, 2025
@sonarqubecloud
Copy link

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 Backport Backport PR and backport failure issues

Projects

Status: Needs more info

Development

Successfully merging this pull request may close these issues.

5 participants