You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.../resolv.rb:898:in `recv_reply': undefined method `unpack' for nil:NilClass (NoMethodError)
from .../resolv.rb:687:in `request'
from .../resolv.rb:531:in `block in fetch_resource'
from .../lib/resolv.rb:1125:in `block (3 levels) in resolv'
from .../lib/resolv.rb:1123:in `each'
from .../lib/resolv.rb:1123:in `block (2 levels) in resolv'
from .../lib/resolv.rb:1122:in `each'
from .../lib/resolv.rb:1122:in `block in resolv'
from .../lib/resolv.rb:1120:in `each'
from .../lib/resolv.rb:1120:in `resolv'
from .../lib/resolv.rb:521:in `fetch_resource'
from .../lib/resolv.rb:507:in `each_resource'
from .../lib/resolv.rb:498:in `getresources'
from (irb):2:in `<main>'
I was unable to reproduce this error in the current master of resolv and Ruby 3.2.
The error is caused by a failure to read the length of TCP message so it looks related to TCP fallback, but is not the same problem as #6, which fails to decode the truncated UDP message.
As the dig result shows SERVER: 127.0.0.53#53(127.0.0.53), the direct nameserver seems to be systemd-resolved's stub listener. IIRC, it had bugs regarding truncation or TCP fallback in the past (I can't find the exact report or fix, but systemd/systemd#6988 may be related).
The reported exception suggests that the TCP socket was closed before sending the message length, and resolv does't handle such a protocol violation. Here we need to check if read(2) actually returns 2 octets:
Reproducible code
Expected result:
Returns TXT records (see below)
Actual result:
Current TXT records of
google.com
The text was updated successfully, but these errors were encountered: