Skip to content

doh: stricter HTTPS RR parsing#22124

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/doh-https-parser
Closed

doh: stricter HTTPS RR parsing#22124
bagder wants to merge 2 commits into
masterfrom
bagder/doh-https-parser

Conversation

@bagder

@bagder bagder commented Jun 22, 2026

Copy link
Copy Markdown
Member

If the target RDATA field tries to use compression, abort.

If any sublabel is longer than 63 octets, abort.

Reported-by: netspacer.research

If the target RDATA field tries to use compression, abort.

If any sublabel is longer than 63 octets, abort.

Reported-by: netspacer.research
@bagder bagder added the name lookup DNS and related tech label Jun 22, 2026
@bagder bagder marked this pull request as ready for review June 22, 2026 07:15
@bagder bagder requested a review from Copilot June 22, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tightens DoH HTTPS RR (RFC 9460) target-name parsing to reject compressed names and overly long labels, improving robustness against malformed RDATA.

Changes:

  • Renames the target hostname length constant to CURL_MAXLEN_HOST_NAME.
  • Rejects HTTPS RR target RDATA that attempts DNS name compression.
  • Adds rejection for sublabels longer than 63 bytes (but currently only for subsequent labels).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/httpsrr.h Renames the hostname-length macro to an all-caps variant.
lib/doh.c Adds stricter HTTPS RR target-name decoding checks (compression + label-length validation).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/doh.c
Comment thread lib/doh.c
@github-actions github-actions Bot added the tests label Jun 22, 2026
@bagder bagder closed this in ab779d4 Jun 22, 2026
@bagder bagder deleted the bagder/doh-https-parser branch June 22, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech tests

Development

Successfully merging this pull request may close these issues.

2 participants