public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "holger@applied-asynchrony.com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nscd/29607] New: nscd repeatably crashes calling __strlen_avx2 when hosts cache is enabled
Date: Fri, 23 Sep 2022 15:39:25 +0000	[thread overview]
Message-ID: <bug-29607-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29607

            Bug ID: 29607
           Summary: nscd repeatably crashes calling __strlen_avx2 when
                    hosts cache is enabled
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: nscd
          Assignee: unassigned at sourceware dot org
          Reporter: holger@applied-asynchrony.com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Gentoo Linux recently enabled use of glibc-2.36 and I quickly found a
repeatable crashing regression with nscd, which was rock-solid reliable with
glibc-2.35.

Initial analysis of the bug is at: https://bugs.gentoo.org/872401

The bug does not occur with hosts cache disabled. Reducing the number of
threads does not help, i.e. it also crashes when run with a single thread and
in -d mode, e.g. in gdb.

With enabled hosts cache nscd quickly crashes, repeatably so with a quick
series of requests which happens e.g. when using mtr (multi-trace-route).

Initial analysis points to aicache:153 being passed a NULL value; this theory
seems to have merit because the crash also happens also on a different platform
where it crashes in __strlen_sse2 - pointing to the same pattern.

The NULL value seems to originate from nss's file-hosts.c:459.

A quick-fix attempt at checking for NULL and using 0 as value for strlen (like
in aicache.c:324) did not help; instead nscd returns odd results (e.g. mtr
says: Packet type unsupported: Invalid argument) and still crashes, so the NULL
pointer being passed to strlen() just seems to be the messenger.

A quick check of the nscd tree shows no major changes recently, so the real
problem is likely somewhere else (nss?). Unfortunately I do not know enough
about glibc's resolver internals to go on a hunt, and can therefore only
report.
I can however gladly and easily test patches.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-09-23 15:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 15:39 holger@applied-asynchrony.com [this message]
2022-09-23 17:19 ` [Bug nscd/29607] " holger@applied-asynchrony.com
2022-09-24  1:17 ` sam at gentoo dot org
2022-09-24  1:18 ` sam at gentoo dot org
2022-09-25 10:50 ` holger@applied-asynchrony.com
2022-09-25 11:09 ` schwab@linux-m68k.org
2022-09-25 11:13 ` holger@applied-asynchrony.com
2022-09-25 11:46 ` holger@applied-asynchrony.com
2022-09-25 12:16 ` holger@applied-asynchrony.com
2022-09-26 18:03 ` sam at gentoo dot org
2022-09-26 19:13 ` holger@applied-asynchrony.com
2022-09-26 19:20 ` holger@applied-asynchrony.com
2022-09-26 19:34 ` holger@applied-asynchrony.com
2022-09-26 19:34 ` sam at gentoo dot org
2022-09-26 19:49 ` holger@applied-asynchrony.com
2022-09-26 20:11 ` holger@applied-asynchrony.com
2022-09-26 20:22 ` siddhesh at sourceware dot org
2022-09-27  5:33 ` holger@applied-asynchrony.com
2022-09-29 23:25 ` sam at gentoo dot org
2022-09-30 18:03 ` siddhesh at sourceware dot org
2022-10-04 22:40 ` cvs-commit at gcc dot gnu.org
2022-10-04 22:44 ` cvs-commit at gcc dot gnu.org
2022-10-04 22:45 ` siddhesh at sourceware dot org
2022-10-07 14:34 ` cvs-commit at gcc dot gnu.org
2022-10-07 14:34 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29607-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).