ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: hannes.georg@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:71248] [Ruby trunk - Bug #11632] [Open] Resolv::DNS::Message.encode fails to encode messages larger than 16383 byte
Date: Wed, 28 Oct 2015 14:59:13 +0000	[thread overview]
Message-ID: <redmine.issue-11632.20151028145911.ba24c353038aa57b@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11632.20151028145911@ruby-lang.org

Issue #11632 has been reported by Hannes Georg.

----------------------------------------
Bug #11632: Resolv::DNS::Message.encode fails to encode messages larger than 16383 byte
https://bugs.ruby-lang.org/issues/11632

* Author: Hannes Georg
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello Rubyists

The ruby dns message encoder automatically remembers _all_ label addresses to be reused later ( see https://github.com/ruby/ruby/blob/v2_2_3/lib/resolv.rb#L1470 ). The address field however is limited to 14 bits ( see https://tools.ietf.org/html/rfc1035#section-4.1.4 ). If the message gets larger than 16383 bytes the addresses of new labels won't fit anymore. The encoder takes this into account and truncates the addresses on write which makes them invalid ( see https://github.com/ruby/ruby/blob/v2_2_3/lib/resolv.rb#L1467 ).

My suggested solution is to not store addresses larger than 16383. Is a github pr okay for that?



-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2015-10-28 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11632.20151028145911@ruby-lang.org>
2015-10-28 14:59 ` hannes.georg [this message]
2015-10-28 22:01 ` [ruby-core:71255] [Ruby trunk - Bug #11632] Resolv::DNS::Message.encode fails to encode messages larger than 16383 byte hannes.georg
2015-11-09  9:21 ` [ruby-core:71411] " hannes.georg
2015-11-12 11:47 ` [ruby-core:71463] " hannes.georg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11632.20151028145911.ba24c353038aa57b@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).