bns icon indicating copy to clipboard operation
bns copied to clipboard

Recursive Resolver returns TXT records from HNS root zone even if NS record is present

Open pinheadmz opened this issue 4 years ago • 0 comments

Running an hsd full node, this bug can be toggled on and off by using unbound's resolver instead.

Example:

On-chain resource:

$ hsd-rpc getnameresource kiba_gateaux
{
  "records": [
    {
      "type": "GLUE4",
      "ns": "ns1.kiba_gateaux.",
      "address": "44.231.6.183"
    },
    {
      "type": "NS",
      "ns": "ns1.kiba_gateaux."
    },
    {
      "type": "TXT",
      "txt": [
        "fAi/2CG3ZOp0zVogpD/rkA8DkMgpFjwShfspJhujL1BOm"
      ]
    },
    {
      "type": "TXT",
      "txt": [
        "fApXxmmBOlxD0soZapm5fUZ+cNm3DEtc6hAf3qlrv65Aq"
      ]
    }
  ]
}

Unbound

hsd

--> dig @127.0.0.1 -p 5350 kiba_gateaux txt

; <<>> DiG 9.16.3 <<>> @127.0.0.1 -p 5350 kiba_gateaux txt
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35434
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: daf70b0df009336e (echoed)
;; QUESTION SECTION:
;kiba_gateaux.                  IN      TXT

;; AUTHORITY SECTION:
kiba_gateaux.           3600    IN      SOA     a.misconfigured.powerdns.server. hostmaster.kiba_gateaux. 2020103002 10800 3600 604800 3600

;; SIG0 PSEUDOSECTION:
.                       0       ANY     SIG     0 253 0 0 20210106224327 20210106104327 15350 . FUhEtST8OCVWk0g56D7GQwdEya4G7CaHXUvh2om5dvVDr8aGT6SpI1tQ GLXnyh6VIy99kg3Y+Kc6e5tHv5VF0Q==

;; Query time: 543 msec
;; SERVER: 127.0.0.1#5350(127.0.0.1)
;; WHEN: Wed Jan 06 11:43:27 EST 2021
;; MSG SIZE  rcvd: 225

BNS

hsd --rs-no-unbound


--> dig @127.0.0.1 -p 5350 kiba_gateaux txt

; <<>> DiG 9.16.3 <<>> @127.0.0.1 -p 5350 kiba_gateaux txt
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23597
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 5a698d897bd4b209 (echoed)
;; QUESTION SECTION:
;kiba_gateaux.                  IN      TXT

;; ANSWER SECTION:
kiba_gateaux.           21600   IN      TXT     "fAi/2CG3ZOp0zVogpD/rkA8DkMgpFjwShfspJhujL1BOm"
kiba_gateaux.           21600   IN      TXT     "fApXxmmBOlxD0soZapm5fUZ+cNm3DEtc6hAf3qlrv65Aq"

;; SIG0 PSEUDOSECTION:
.                       0       ANY     SIG     0 253 0 0 20210106224315 20210106104315 15350 . qMDd3WBUpH/Qc2CHACOpzgn+pDQJ9tp8s/rMObUISf0br55y5yrd4uAl RinvDIDF95nGXQdb8IKzExIW6aXFBw==

;; Query time: 86 msec
;; SERVER: 127.0.0.1#5350(127.0.0.1)
;; WHEN: Wed Jan 06 11:43:15 EST 2021
;; MSG SIZE  rcvd: 263

pinheadmz avatar Jan 06 '21 16:01 pinheadmz