Skip to content

Conversation

@rlubos
Copy link
Contributor

@rlubos rlubos commented Nov 24, 2025

Manual backport of 7bd45cd from #99683.

I've dropped the test commit, as on v3.7-branch dns_unpack_name() was a static function.

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)
@github-actions github-actions bot requested a review from jukkar November 24, 2025 10:48
@rlubos rlubos added the Backport Backport PR and backport failure issues label Nov 24, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Nov 24, 2025
@sonarqubecloud
Copy link

@JarmouniA JarmouniA added this to the v3.7.2 milestone Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking Backport Backport PR and backport failure issues

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

4 participants