[PR #581] [MERGED] Pointer in compressed label should not point to a current Name #1529

Closed
opened 2026-03-16 02:11:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/581
Author: @oherrala
Created: 10/10/2018
Status: Merged
Merged: 10/10/2018
Merged by: @bluejekyll

Base: masterHead: fix-name-reading


📝 Commits (1)

  • c10e88d Pointer in compressed label should not point to a current Name

📊 Changes

1 file changed (+9 additions, -2 deletions)

View changed files

📝 proto/src/rr/domain/name.rs (+9 -2)

📄 Description

This PR is related to prior PR #578 and backport PR #579.

If a pointer points to a current name it will cause infinite loop in parsing. This PR fixes the verification that the label pointer can only point to offset prior to the current Name.

Consider for example Name with label "a" followed by pointer to prior label "a". This will read "a" until stack runs out. "a.a.a.a.a.a..."

RFC1035 section 4.1.4 states that

In this scheme, an entire domain name or a list of labels at the end of a domain name is replaced with a pointer to a prior occurance of the same name.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/581 **Author:** [@oherrala](https://github.com/oherrala) **Created:** 10/10/2018 **Status:** ✅ Merged **Merged:** 10/10/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `fix-name-reading` --- ### 📝 Commits (1) - [`c10e88d`](https://github.com/hickory-dns/hickory-dns/commit/c10e88d535ddcc9696cb82e52e8e5a48f55fbb73) Pointer in compressed label should not point to a current Name ### 📊 Changes **1 file changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `proto/src/rr/domain/name.rs` (+9 -2) </details> ### 📄 Description This PR is related to prior PR #578 and backport PR #579. If a pointer points to a current name it will cause infinite loop in parsing. This PR fixes the verification that the label pointer can only point to offset prior to the current Name. Consider for example Name with label "a" followed by pointer to prior label "a". This will read "a" until stack runs out. "a.a.a.a.a.a..." RFC1035 section 4.1.4 states that > In this scheme, an entire domain name or a list of labels at the end of a domain name is replaced with a pointer to a prior occurance of the same name. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:11:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1529
No description provided.