public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nscd/29607] New: nscd repeatably crashes calling __strlen_avx2 when hosts cache is enabled
@ 2022-09-23 15:39 holger@applied-asynchrony.com
  2022-09-23 17:19 ` [Bug nscd/29607] " holger@applied-asynchrony.com
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: holger@applied-asynchrony.com @ 2022-09-23 15:39 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-10-07 14:34 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 15:39 [Bug nscd/29607] New: nscd repeatably crashes calling __strlen_avx2 when hosts cache is enabled holger@applied-asynchrony.com
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

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).