Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16316

Re: Seg fault on "echo ~nosuchuser"

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
Newsgroups gnu.bash.bug
Subject Re: Seg fault on "echo ~nosuchuser"
Date Fri, 29 May 2020 19:28:52 +0700
Lines 37
Approved bug-bash@gnu.org
Message-ID <mailman.620.1590755408.2541.bug-bash@gnu.org> (permalink)
References <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com> <15202.1590755332@jinx.noi.kre.to>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1590755408 3117 209.51.188.17 (29 May 2020 12:30:08 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Keith Thompson <Keith.S.Thompson@gmail.com>
Envelope-to bug-bash@gnu.org
In-Reply-To <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com>
Received-SPF permerror client-ip=2001:3c8:9009:181::2; envelope-from=kre@munnari.OZ.AU; helo=munnari.OZ.AU
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -18
X-Spam_score -1.9
X-Spam_bar -
X-Spam_report (-1.9 / 5.0 requ) BAYES_00=-1.9, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <15202.1590755332@jinx.noi.kre.to>
X-Mailman-Original-References <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16316

Show key headers only | View raw


    Date:        Thu, 28 May 2020 15:12:47 -0700
    From:        Keith Thompson <Keith.S.Thompson@gmail.com>
    Message-ID:  <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com>


  | Program received signal SIGSEGV, Segmentation fault.
  | 0x00007ffff777eddb in ?? () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
  | (gdb) where
  | #0  0x00007ffff777eddb in ?? () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
  | #1  0x00007ffff77721c8 in ?? () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
  | #2  0x00007ffff7773009 in ?? () from /lib/x86_64-linux-gnu/libnss_systemd.so.2
  | #3  0x00007ffff77883e7 in _nss_systemd_getpwnam_r () from
  | /lib/x86_64-linux-gnu/libnss_systemd.so.2
  | #4  0x00007ffff7e53f03 in __getpwnam_r (name=name@entry=0x555555722368
  | "nosuchuser", resbuf=resbuf@entry=0x7ffff7f5e140 <resbuf>,
  | buffer=0x555555777808 "systemd-coredump",
  |     buflen=buflen@entry=1024, result=result@entry=0x7fffffffddb0) at
  | ../nss/getXXbyYY_r.c:315
  | #5  0x00007ffff7e537ec in getpwnam (name=0x555555722368 "nosuchuser")
  | at ../nss/getXXbyYY.c:134

Since that shows the crash is inside getpwnam() (or more correctly, the
NSS finctions it calls) and also shows that the correct arg was passed to
getpwnam(), it is unlikely to be a bash bug.

This one needs to be reported to whoever supplies the libc you're using,
and they will want to know what is in your nss config fle (at least the
entry for "passwd").

kre

ps: for what it is worth, this doesn't fail on NetBSD either - where I
have the NSS configured as
	passwd:         files


Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Seg fault on "echo ~nosuchuser" Robert Elz <kre@munnari.OZ.AU> - 2020-05-29 19:28 +0700

csiph-web