Bug 476505

Summary: regression: Host resolving fails when many aliases are present.
Product: [Fedora] Fedora Reporter: Emmanuel Thomé <emmanuel.thome>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: drepper, jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-23 19:34:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Emmanuel Thomé 2008-12-15 10:30:16 UTC
$ rpm -q glibc
glibc-2.9-3.x86_64

In gaih_inet, a fixed size buffer is allocated for the work within the resolving routines. This buffer is populated in particular from within parse_line, where pointers to all the aliases are placed.

When many aliases are present, resolving fails because this buffer fills up. This happens irrespective of the resolving method used (files or NIS ; does not apply to dns).

Have this for example in /etc/hosts:

1.2.3.4  a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 a53 a54 a55 a56 a57 a58 a59 a60 a61 a62 a63 a64 a65 a66 a67 a68 a69 a70 a71 a72 a73 a74 a75 a76 a77 a78 a79 a80 a81 a82 a83 a84 a85 a86 a87 a88 a89 a90 a91 a92 a93 a94 a95 a96 a97

Then:

$ telnet a0
telnet: a0: System error
a0: Resolver internal error

One should get ``trying 1.2.3.4'' instead.

Package glibc-2.8-8 does not suffer from this problem.

Bug 473073 contains a partial patch for the problem, albeit certainly not satisfactory at a more general level.

I do have a host here which I can't access because of this very bug.

E.

Comment 1 Ulrich Drepper 2008-12-29 23:46:34 UTC
Fixed upstream.  The reference to bug 473073 is wrong, this is a completely different issue.

Comment 2 Emmanuel Thomé 2009-04-23 19:34:10 UTC
glibc-2.9.90-19.x86_64 works ok. Thanks.