From owner-freebsd-bugs@freebsd.org Mon Oct 3 20:31:14 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9FF7AF4040 for ; Mon, 3 Oct 2016 20:31:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C982814A for ; Mon, 3 Oct 2016 20:31:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u93KVEtQ057029 for ; Mon, 3 Oct 2016 20:31:14 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213178] resolv "asked for IN A got RRSIG" syslog spamming with DNSSEC bit set Date: Mon, 03 Oct 2016 20:31:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: alexander@wittig.name X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 20:31:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213178 Bug ID: 213178 Summary: resolv "asked for IN A got RRSIG" syslog spamming with DNSSEC bit set Product: Base System Version: 10.3-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: alexander@wittig.name Created attachment 175397 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D175397&action= =3Dedit short test case triggering the warning to syslog I noticed when compiling the mail/exim port with DNSSEC enabled (and with t= he default local unbound resolving DNS server) I get many syslog messages to /var/log/messages such as Oct 3 22:07:25 hotzenplotz exim: gethostby*.gethostanswer: asked for "www.wittig.name IN A", got type "RRSIG" This message repeats for every DNSSEC enabled lookup. The lookup itself is successful. I traced the problem back to src/lib/libc/net/getaddrinfo.c, around line 21= 00. When the resolver receives a different record type than it asked for, the warning is logged and the unknown record is ignored. The logging code is in principle inside an #ifdef DEBUG, but it seems the code is compiled with DE= BUG set. By default the libc resolver does not set the DNSSEC flag, as, from what I understand, it does not yet know how to handle the response. However, it is possible to set it from the user program (via the _res structure). This is = what exim does to enable DNSSEC. The attached sample code is a short extract of = the exim code setting these options and performing a lookup that triggers the message logged to syslog. The immediate solution to the problem is of course not to enable the DNSSEC flag in user code as the libc resolver anyway doesn't support it yet. Howev= er, as use of DNSSEC becomes more widely spread and other resolvers start to support it, more code will probably enable it by default. And the warning logged by the resolver is confusing as it warns about perfectly correct, no= rmal DNSSEC behavior. The resolver code already contains a list of accepted responses where the response record type can differ from what was requested. This includes the = old SIG and KEY records as well as DNAME records (see old bug bin/127591 for an almost identical problem arising from DNAME instead of RRSIG). It would be straight forward to also add RRSIGs and DNSKEYs to the list of exempted responses. Alternatively, the file in question could just be compiled without DEBUG se= t, which would remove the logging of such warnings. Note that glibc, who's resolver is based on the same original bind code bas= e, on the other hand simply decided to completely drop these messages and remo= ve them from the code (https://sourceware.org/git/gitweb.cgi?p=3Dglibc.git;a=3Dcommitdiff;h=3Db9b= 026c9c00db1a1b5b4a3caa28162655a04a882). --=20 You are receiving this mail because: You are the assignee for the bug.=