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

David Herrmann dh.herrmann at gmail.com
Thu Nov 27 08:13:00 PST 2014


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.

Thanks
David


More information about the systemd-devel mailing list