Skip to content

Bug: Issue with corrupted DNS records when converted back to a buffer in callback (ares_send) #757

Closed

Description

@eriklax

When using the API of ares_send the internal process of converting a ares_dns_record_t back to a buffer using ares_dns_write may occasionally corrupt the record. I've located the issue to the ares_dns_write_rr function. The problem occurres when allow_compress is true.

As an example, the following command ./bin/adig -t MX fip.it should return

fip.it.		5709	IN	MX	10 libra2.fip.it.
fip.it.		5709	IN	MX	10 libra1.fip.it.

but returns since e862d1f it returns trhis

fip.it.		5703	IN	MX	10 fip.it.
fip.it.		5703	IN	MX	10 fip.it.

Forefully disable allow_compress fixes this.

allow_compress = ares_dns_rec_type_allow_name_compression(type);
if (allow_compress) {
namelistptr = namelist;
}

Activity

  1. bradh352 commented on May 15, 2024

    @bradh352
    Member

    thanks for the report, a fix has been committed for this issue

  2. eriklax commented on May 15, 2024

    @eriklax
    ContributorAuthor

    Thanks, would this justify a patch release for 1.28 or how far out is 1.29?

  3. bradh352 commented on May 15, 2024

    @bradh352
    Member

    yes it definitely would. I'll work with @bagder about getting a new release out the door. Its about time for 1.29 anyhow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions