[systemd-devel] [PATCH] Stop crashing on empty TXT

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Nov 27 21:35:04 PST 2014


On Thu, Nov 27, 2014 at 05:13:00PM +0100, David Herrmann wrote:
> Hi
> 
> On Thu, Nov 27, 2014 at 5:09 PM, Zbigniew Jędrzejewski-Szmek
> <zbyszek at in.waw.pl> wrote:
> > On Thu, Nov 27, 2014 at 04:12:20PM +0100, David Herrmann wrote:
> >> Hi
> >>
> >> On Tue, Nov 18, 2014 at 4:52 AM, Stanisław Pitucha <viraptor at gmail.com> wrote:
> >> > TXT records should have at least one character, so enforce this.
> >> > Previously parser SIGSEGV'd on ->txt.strings being NULL.
> >>
> >> Your patch fixes the issue, indeed. However, I didn't have the time to
> >> look this up in the DNS RFC. I'm not really sure TXT records cannot be
> >> empty (and I'm not sure any follow-up RFC allows empty records).
> >> Therefore, I fixed resolved to work with empty txt.strings strvs
> >> instead. See:
> > I think we should follow the RFCs here and reject invalid TXT strings.
> > RFC1035 says "TXT-DATA        One or more <character-string>s."
> > So {""} is fine (strv size one, with an empty string), but not {}.
> 
> Thanks for the verification!
> 
> Did you check that the same is true for SPF? The code handles TXT and
> SPF the same way.
SPF follows TXT in everything but the name, so they should be handled the
same.

Zbyszek


More information about the systemd-devel mailing list