From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 19B7A3858D28; Thu, 2 Nov 2023 10:56:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19B7A3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698922588; bh=BSXWs0q7xLQMN87mj9rKDxWEPWvN8Q9Ifoiatg/OrGs=; h=From:To:Subject:Date:From; b=DbeY6kWjhIHW7NFai7UbOx7c2HEjTJHbQ0Fz+5tIhVKmDNjdVClAYfvN6i+H8NmnP h/RZpAd9Pb31kkpa6OoKVk0XB687QqQxir7JJuRyeXaO+G5FJeOyDv3AWt071tMv3B Ia9RLr/v8B9QESV9lMQuwRMofn2Noh4Te0rnUs6Q= From: "joshua at joshua dot hu" To: glibc-bugs@sourceware.org Subject: [Bug network/31026] New: Reachable assertion in resolv_conf.c:570: update_from_conf: Assertion `resolv_conf_matches (resp, conf)' failed. Date: Thu, 02 Nov 2023 10:56:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: network X-Bugzilla-Version: 2.40 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joshua at joshua dot hu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security? X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31026 Bug ID: 31026 Summary: Reachable assertion in resolv_conf.c:570: update_from_conf: Assertion `resolv_conf_matches (resp, conf)' failed. Product: glibc Version: 2.40 Status: UNCONFIRMED Severity: normal Priority: P2 Component: network Assignee: unassigned at sourceware dot org Reporter: joshua at joshua dot hu Target Milestone: --- Flags: security? Hi there, There is a reachable assert in resolv/resolv_conf.c:update_from_conf: /* The overlapping parts of both configurations should agree after initialization. */ assert (resolv_conf_matches (resp, conf)); resolv_conf_matches returns negative in the case of: /* resp->dnsrch is truncated if the number of elements exceeds MAXDNSRCH, or if the combined storage space for the search list exceeds what can be stored in resp->defdname. */ if (i =3D=3D MAXDNSRCH || search_list_size > sizeof (resp->dnsr= ch)) break; /* Otherwise, a mismatch indicates a match failure. */ return false; } Specifically, if the combined storage space for the search line is in exces= s, it is already truncated update_from_conf: for (i =3D 0; i < size && i < MAXDNSRCH; ++i) { resp->dnsrch[i] =3D alloc_buffer_copy_string (&buffer, conf->search_list[i]); if (resp->dnsrch[i] =3D=3D NULL) /* No more space in resp->defdname. Truncate. */ break; } resp->dnsrch[i] =3D NULL; } An example: echo "search example.org example.com example.net corp.corp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.ex= amcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examc= orp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp= .examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.ex= amcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examcorp.examc= orp.examcorp.exam" >> /etc/resolv.conf # ping example.com ping: resolv_conf.c:570: update_from_conf: Assertion `resolv_conf_matches (resp, conf)' failed. Aborted Cheers, Josh --=20 You are receiving this mail because: You are on the CC list for the bug.=