MIME-Version: 1.0 Subject: dig's handling of OPT RRs content-type: text/plain; charset="utf-8" Message-ID: <4047355f-73fd-b201-18e8-72f73e4bdaa0@isc.org> Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.ams1.isc.org X-RT-Incoming-Encryption: Not encrypted From: "Ray Bellis" X-Original-To: bind9-confidential@bugs.isc.org Content-Transfer-Encoding: quoted-printable Date: Tue, 25 Jul 2017 13:04:17 +0100 Delivered-To: bind9-confidential@bugs.isc.org From ray@isc.org Tue Jul 25 12:05:39 2017 To: bind9-bugs@isc.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Received: from mx.ams1.isc.org (mx.ams1.isc.org [199.6.1.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mx.ams1.isc.org", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by bugs.isc.org (Postfix) with ESMTPS id AB3F0D78AA1 for ; Tue, 25 Jul 2017 12:05:39 +0000 (UTC) Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.ams1.isc.org (Postfix) with ESMTPS id 9316E24AE0B for ; Tue, 25 Jul 2017 12:04:15 +0000 (UTC) Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 595EB16003A for ; Tue, 25 Jul 2017 12:04:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 48C8216005B for ; Tue, 25 Jul 2017 12:04:20 +0000 (UTC) Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gJpEjrFAtlYj for ; Tue, 25 Jul 2017 12:04:20 +0000 (UTC) Received: from rays-mbp.local (unknown [46.227.151.81]) by zmx1.isc.org (Postfix) with ESMTPSA id DACFA16003A for ; Tue, 25 Jul 2017 12:04:19 +0000 (UTC) Content-Language: en-US X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-RT-Original-Encoding: utf-8 X-RT-Interface: Email Content-Length: 516 If you supply +ednsopt=nn[:xx] dighost.c accumulates the supplied options in a global array, but doesn't dispose of old ones, eventually triggering a fatal() error when the number reaches EDNSOPT_OPTIONS (100). In batch mode this terminates the program. In dig for iOS the fatal() call doesn't happen, but the array fills up and a crash would occur. The array of options is ultimately disposed of in destroy_libs(), but it's unclear why the entries aren't cleaned up and the array reinitialised for each query.