Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0x7F char causes "Unable to parse DNS TXT" in powerdns-recursor #1727

Closed
mbevand opened this issue Sep 24, 2014 · 8 comments
Closed

0x7F char causes "Unable to parse DNS TXT" in powerdns-recursor #1727

mbevand opened this issue Sep 24, 2014 · 8 comments

Comments

@mbevand
Copy link

mbevand commented Sep 24, 2014

When the latest powerdns-recursor version (3.6.1) attempts to resolve a TXT record containing the character 0x7F (DEL), it errors out (see error below). This is because 837f4b4 was an incomplete fix: "> 127" should be replaced with "> 126".

STL error: Unable to parse DNS TXT '"\x7f"'

@mbevand
Copy link
Author

mbevand commented Oct 3, 2014

Any update? It is a one-line patch to fix this issue... I created a record to help you guys test and validate the fix. If x.x.x.x is a PowerDNS resolver run:

$ dig @x.x.x.x -t txt bug.zorinaq.com

Actual result: dig times out... and pdns_recursor logs show "Unable to parse DNS TXT '"\x7f"'

Expected result: dig showing:

; <<>> DiG 9.9.5-3-Ubuntu <<>> @x.x.x.x -t txt bug.zorinaq.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5858
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;bug.zorinaq.com. IN TXT

;; ANSWER SECTION:
bug.zorinaq.com. 299 IN TXT "\127"

[...]

@txdv
Copy link

txdv commented Oct 4, 2014

Your blog stated you had a patch. Where is the patch?

@Habbie
Copy link
Member

Habbie commented Oct 6, 2014

The patch is described in the first post on this page.

@Habbie
Copy link
Member

Habbie commented Oct 6, 2014

Bug confirmed in 3.5.3

@Habbie
Copy link
Member

Habbie commented Oct 6, 2014

Works for me on 3.6.1 though!

Can you verify that you really are running 3.6.1? Then, can you tell us exactly how you built it and on what system?

@mbevand
Copy link
Author

mbevand commented Oct 6, 2014

As Habbie said, the patch is described in the first post on this page (replacing "> 127" with "> 126" at line 395 of this patch: 837f4b4).

I built 3.6.1 on Ubuntu 14.04 with a simple ./configure && make (and running pdns-recursor from the source tree.) Although it has been 2 weeks since I did it so I don't recall the exact details and did not take notes other than submitting this bug. I will double-check tonight my steps...

@mbevand
Copy link
Author

mbevand commented Oct 7, 2014

Hmm, I am indeed unable to reproduce it with 3.6.1. The bug only exists with 3.5.3. Something else must have changed in the logic causing 3.6.1 to work despite "> 127" in this if condition.

@Habbie
Copy link
Member

Habbie commented Oct 7, 2014

973efd3 fixed this. Closing ticket!

@Habbie Habbie closed this as completed Oct 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants