tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads



Joerg Sonnenberger wrote in
 <YaT9P6a+AlEm3w7h%bec.de@localhost>:
 |On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote:
 |> DNS queries (via UDP) are limited to max 512, as that is what the
 |> protocol always required, so can be handled by everything (or should be).
 |
 |Strictly speaking, it is the minimum MTU every IPv4 implementation is
 |supposed to allow. IPv6 bumped it to 1280.

RFC 1035 says

  2.3.4. Size limits
  ...
  UDP messages    512 octets or less

If no EDNS is in use the answer should be pretty small also.
Also see RFC 2671, but i have forgotten about all that.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Home | Main Index | Thread Index | Old Index