X-Loop: help-debbugs@HIDDEN Subject: bug#22811: adns crash bugfix/patch Resent-From: Jared Mauch <jared@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: adns-discuss@HIDDEN Resent-Date: Fri, 26 Feb 2016 01:40:01 +0000 Resent-Message-ID: <handler.22811.B.145645077912876 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 22811 X-GNU-PR-Package: adns X-GNU-PR-Keywords: To: 22811 <at> debbugs.gnu.org Cc: ijackson@HIDDEN X-Debbugs-Original-To: submit <at> debbugs.gnu.org Received: via spool by submit <at> debbugs.gnu.org id=B.145645077912876 (code B ref -1); Fri, 26 Feb 2016 01:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Feb 2016 01:39:39 +0000 Received: from localhost ([127.0.0.1]:46492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1aZ7Nb-0003Lb-5g for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 20:39:39 -0500 Received: from puck.nether.net ([204.42.254.5]:60674) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from <jared@HIDDEN>) id 1aZ7Dk-00035w-L1 for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 20:29:28 -0500 Received: from [IPv6:2601:401:3:6a00:9121:4b53:2e29:c38e] (unknown [IPv6:2601:401:3:6a00:9121:4b53:2e29:c38e]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by puck.nether.net (Postfix) with ESMTPSA id B0756540760; Thu, 25 Feb 2016 20:29:25 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3120\)) From: Jared Mauch <jared@HIDDEN> Date: Thu, 25 Feb 2016 20:29:26 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <FDEA0E83-E654-40F2-8D3F-545E82371402@HIDDEN> X-Mailer: Apple Mail (2.3120) X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Thu, 25 Feb 2016 20:39:37 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Package: adns diff --git a/src/types.c b/src/types.c index d65e155..55bf098 100644 --- a/src/types.c +++ b/src/types.c @@ -984,12 +984,13 @@ static int di_hostaddr(adns_state ads, } =20 static void mfp_hostaddr(adns_query qu, adns_rr_hostaddr *rrp) { - void *tablev; + void *tablev =3D NULL; size_t addrsz=3D gsz_addr(0, qu->answer->type); =20 adns__makefinal_str(qu,&rrp->host); tablev=3D rrp->addrs; - adns__makefinal_block(qu, &tablev, rrp->naddrs*addrsz); + if (rrp->naddrs > 0) + adns__makefinal_block(qu, &tablev, rrp->naddrs*addrsz); rrp->addrs=3D tablev; } =20 This occurs when something is queried and comes back bogus/semi-bogus, = eg: (gdb) bt #0 __memcpy_sse2_unaligned () at = ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:116 #1 0x00007ff5811c0b68 in memcpy (__len=3D18446744073709551584, = __src=3D0x25fb6a8, __dest=3D<optimized out>) at = /usr/include/x86_64-linux-gnu/bits/string3.h:51 #2 adns__makefinal_block (qu=3Dqu@entry=3D0x2478590, = blpp=3Dblpp@entry=3D0x7ffd2c153db8, sz=3D18446744073709551584) at = ../src/query.c:675 #3 0x00007ff5811bb8ae in mfp_hostaddr (qu=3D0x2478590, rrp=3D0x24af8f0) = at ../src/types.c:992 #4 0x00007ff5811c0d5c in makefinal_query (qu=3D0x2478590) at = ../src/query.c:593 #5 adns__query_done (qu=3D0x2478590) at ../src/query.c:646 #6 0x00007ff5811c097a in adns__returning (ads=3Dads@entry=3D0x242a010, = qu_for_caller=3Dqu_for_caller@entry=3D0x0) at ../src/query.c:514 #7 0x00007ff5811be988 in adns_processreadable (ads=3D0x242a010, fd=3D3, = now=3D0x7ffd2c154148) at ../src/event.c:429 #8 0x00007ff5811bf854 in fd_event (ads=3D0x242a010, fd=3D39827112, = fd@entry=3D3, revent=3D-32, revent@entry=3D7, pollflag=3D526672, = pollflag@entry=3D1, maxfd=3D32917, maxfd@entry=3D6, = fds=3D0xffffffffffffffe, fds@entry=3D0x7ffd2c1542d0,=20 func=3Dfunc@entry=3D0x7ff5811be7b0 <adns_processreadable>, now=3D..., = r_r=3Dr_r@entry=3D0x0) at ../src/event.c:519 #9 0x00007ff5811bf94e in adns__fdevents (ads=3Dads@entry=3D0x242a010, = pollfds=3Dpollfds@entry=3D0x7ffd2c154210, npollfds=3D<optimized out>, = maxfd=3Dmaxfd@entry=3D6, readfds=3Dreadfds@entry=3D0x7ffd2c1542d0, = writefds=3Dwritefds@entry=3D0x7ffd2c154350,=20 exceptfds=3Dexceptfds@entry=3D0x7ffd2c1543d0, now=3D..., = r_r=3Dr_r@entry=3D0x0) at ../src/event.c:544 #10 0x00007ff5811bfaa5 in adns_afterselect (ads=3D0x242a010, maxfd=3D6, = readfds=3Dreadfds@entry=3D0x7ffd2c1542d0, = writefds=3Dwritefds@entry=3D0x7ffd2c154350, = exceptfds=3Dexceptfds@entry=3D0x7ffd2c1543d0, now=3D0x7ffd2c154200, = now@entry=3D0x0) at ../src/event.c:599 #11 0x000000000040166c in main (argc=3D<optimized out>, argv=3D<optimized = out>) at adh-main.c:268 (gdb) up #4 0x00007ff5811c0d5c in makefinal_query (qu=3D0x2478590) at = ../src/query.c:593 593 qu->typei->makefinal(qu, ans->rrs.bytes + rrn*ans->rrsz); (gdb) up #5 adns__query_done (qu=3D0x2478590) at ../src/query.c:646 646 makefinal_query(qu); (gdb) print qu $6 =3D (adns_query) 0x2478590 (gdb) up #6 0x00007ff5811c097a in adns__returning (ads=3Dads@entry=3D0x242a010, = qu_for_caller=3Dqu_for_caller@entry=3D0x0) at ../src/query.c:514 514 iq->ctx.callback(parent,iq); (gdb) print parent $7 =3D <optimized out> (gdb) print iq $8 =3D (adns_query) 0x24d8db0 (gdb) down #5 adns__query_done (qu=3D0x2478590) at ../src/query.c:646 646 makefinal_query(qu); (gdb) down #4 0x00007ff5811c0d5c in makefinal_query (qu=3D0x2478590) at = ../src/query.c:593 593 qu->typei->makefinal(qu, ans->rrs.bytes + rrn*ans->rrsz); (gdb) down #3 0x00007ff5811bb8ae in mfp_hostaddr (qu=3D0x2478590, rrp=3D0x24af8f0) = at ../src/types.c:992 992 adns__makefinal_block(qu, &tablev, rrp->naddrs*addrsz); (gdb) print rrp->naddrs $9 =3D -1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Jared Mauch <jared@HIDDEN> Subject: bug#22811: Acknowledgement (adns crash bugfix/patch) Message-ID: <handler.22811.B.145645077912876.ack <at> debbugs.gnu.org> References: <FDEA0E83-E654-40F2-8D3F-545E82371402@HIDDEN> X-Gnu-PR-Message: ack 22811 X-Gnu-PR-Package: adns Reply-To: 22811 <at> debbugs.gnu.org Date: Fri, 26 Feb 2016 01:40:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): adns-discuss@HIDDEN If you wish to submit further information on this problem, please send it to 22811 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 22811: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22811 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#22811: adns crash bugfix/patch Resent-From: Ian Jackson <ijackson@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: adns-discuss@HIDDEN Resent-Date: Fri, 12 Aug 2016 21:13:01 +0000 Resent-Message-ID: <handler.22811.B22811.147103636318286 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 22811 X-GNU-PR-Package: adns X-GNU-PR-Keywords: To: Jared Mauch <jared@HIDDEN> Cc: 22811 <at> debbugs.gnu.org Received: via spool by 22811-submit <at> debbugs.gnu.org id=B22811.147103636318286 (code B ref 22811); Fri, 12 Aug 2016 21:13:01 +0000 Received: (at 22811) by debbugs.gnu.org; 12 Aug 2016 21:12:43 +0000 Received: from localhost ([127.0.0.1]:55485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1bYJkx-0004ks-4n for submit <at> debbugs.gnu.org; Fri, 12 Aug 2016 17:12:43 -0400 Received: from chiark.greenend.org.uk ([212.13.197.229]:60701 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ijackson@HIDDEN>) id 1bYJkv-0004kk-Cr for 22811 <at> debbugs.gnu.org; Fri, 12 Aug 2016 17:12:41 -0400 Received: by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with local (return-path ijackson@HIDDEN) id 1bYJku-0001jm-JB; Fri, 12 Aug 2016 22:12:40 +0100 From: Ian Jackson <ijackson@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <22446.15304.528894.311459@HIDDEN> Date: Fri, 12 Aug 2016 22:12:40 +0100 Newsgroups: chiark.mail.adns.discuss In-Reply-To: <FDEA0E83-E654-40F2-8D3F-545E82371402@HIDDEN> References: <FDEA0E83-E654-40F2-8D3F-545E82371402@HIDDEN> X-Mailer: VM 8.2.0b under 24.4.1 (i586-pc-linux-gnu) X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.8 (--) Jared Mauch writes ("bug#22811: adns crash bugfix/patch"): > This occurs when something is queried and comes back bogus/semi-bogus, eg: Thanks. I have a different fix for this in my tree which I am about to release. Regards, Ian.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.