Report information
The Basics
Id:
46402
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
9.12.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
bug

Dates
Created:Wed, 25 Oct 2017 12:04:44 -0400
Updated:Thu, 26 Oct 2017 01:02:35 -0400
Closed:Thu, 26 Oct 2017 01:02:35 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Date: Wed, 25 Oct 2017 18:04:31 +0200
To: bind9-bugs@isc.org
Subject: nsupdate INSISTs if server is specified and transport protocol is ipv6
From: "Holger Zuleger" <Holger.Zuleger@hznet.de>
Hi again, first of all: Thanks for fixing the last nsupdate bug so fast! Sadly I saw another issue with nsupdate. If I define the server to send the update to, *and* request ipv6 as transport protocol, I will get an INSIST in mem.c: $ { echo "server ns2.hznet.de."; echo "update del test.hznet.de IN TXT hello"; echo; } | nsupdate -d -6 -v mem.c:709: INSIST(*cp == 0xbe) failed, back trace #0 0x5a7b74 in ?? #1 0x5a7ada in ?? #2 0x40ff39 in ?? #3 0x5bb530 in ?? #4 0x413558 in ?? #5 0x41595d in ?? #6 0x5c819b in ?? #7 0x7f8966477184 in ?? #8 0x7f8965e3dffd in ?? Aborted (core dumped) This is the current version from the git repository: $ nsupdate -V nsupdate 9.12.0b1 Don't know this helps, but here is the stack trace: $ gdb /usr/local/bin/nsupdate core GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/local/bin/nsupdate...done. [New LWP 2908] [New LWP 2905] [New LWP 2907] [New LWP 2906] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `nsupdate -d -6 -v'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f8965d76c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007f8965d76c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007f8965d7a028 in __GI_abort () at abort.c:89 #2 0x00000000005a7adf in isc_assertion_failed (file=file@entry=0x621870 "mem.c", line=line@entry=709, type=type@entry=isc_assertiontype_insist, cond=cond@entry=0x621864 "*cp == 0xbe") at assertions.c:50 #3 0x000000000040ff39 in check_overrun (mem=mem@entry=0x7f8967380010, size=<optimised out>, size@entry=0, new_size=new_size@entry=8) at mem.c:709 #4 0x00000000005bb530 in mem_putunlocked (size=0, mem=0x7f8967380010, ctx=0x1441010) at mem.c:739 #5 isc___mem_put (ctx0=0x1441010, ptr=0x7f8967380010, size=0, file=0x5e39a4 "./nsupdate.c", line=<optimised out>) at mem.c:1337 #6 0x0000000000413558 in evaluate_server (cmdline=0x0) at ./nsupdate.c:1556 #7 do_next_command (cmdline=0x7f8963751dd7 "ns2.hznet.de.") at ./nsupdate.c:2175 #8 get_next_command () at ./nsupdate.c:2290 #9 0x000000000041595d in user_interaction () at ./nsupdate.c:2305 #10 getinput (task=<optimised out>, event=<optimised out>) at ./nsupdate.c:3329 #11 0x00000000005c819b in dispatch (manager=0x7f896738a010) at task.c:1137 #12 run (uap=0x7f896738a010) at task.c:1309 #13 0x00007f8966477184 in start_thread (arg=0x7f8963772700) at pthread_create.c:312 #14 0x00007f8965e3dffd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) quit Again, many thanks for your help BR Holger

Message body not shown because it is not plain text.

This one is a simple one. We failed to skip the A record for the host with -6. It would also fail with -4. Thanks. Now for review. diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index c922cf9765..a13a38ad04 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -944,11 +944,15 @@ setup_system(void) { case AF_INET: if (have_ipv4) { sa->type.sin.sin_port = htons(dnsport); + } else { + continue; } break; case AF_INET6: if (have_ipv6) { sa->type.sin6.sin6_port = htons(dnsport); + } else { + continue; } break; default:
Subject: Re: [ISC-Bugs #46402] nsupdate INSISTs if server is specified and transport protocol is ipv6
To: bind9-confidential@isc.org
Date: Wed, 25 Oct 2017 23:01:46 +0200
From: "Holger Zuleger" <Holger.Zuleger@hznet.de>
Hi Mark, > This one is a simple one. We failed to skip the A record for the host > with -6. It would also fail with -4. Thanks. Now for review. thank you very much for your support. > diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c > index c922cf9765..a13a38ad04 100644 > --- a/bin/nsupdate/nsupdate.c > +++ b/bin/nsupdate/nsupdate.c > @@ -944,11 +944,15 @@ setup_system(void) { > case AF_INET: > if (have_ipv4) { > sa->type.sin.sin_port = htons(dnsport); > + } else { > + continue; > } > break; > case AF_INET6: > if (have_ipv6) { > sa->type.sin6.sin6_port = htons(dnsport); > + } else { > + continue; > } > break; > default: > As always: Works great! Holger

Message body not shown because it is not plain text.

Looks fine.
4793. [bug] nsupdate -[46] could overflow the array of server addresses. [RT #46402]