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


Groups > gnu.bash.bug > #16318

Re: Seg fault on "echo ~nosuchuser"

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Keith Thompson <Keith.S.Thompson@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Seg fault on "echo ~nosuchuser"
Date Fri, 29 May 2020 11:50:43 -0700
Lines 49
Approved bug-bash@gnu.org
Message-ID <mailman.646.1590778264.2541.bug-bash@gnu.org> (permalink)
References <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com> <0c4fcd5b-3ac6-ea8c-e537-b4bfc9215de4@case.edu> <CAAHpriN1QYMAHOqAKHr=yOJF-0tiiKDnzqawXh+DYxP7=wrDiA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1590778264 16218 209.51.188.17 (29 May 2020 18:51:04 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org, Keith Thompson <Keith.S.Thompson@gmail.com>
To Chester Ramey <chet.ramey@case.edu>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wOxjgNbP3jDwLXDKff0kEy4VKMlsiC3aiae1tQGHztE=; b=ANDPiuvAlhGpns1zJvclMkO48LcAQIJ3Wn2wCDuE24b/jtftV/ryDXKjiD2gw1W7qm jfxjPZQ6Z267UmBavP3ld7aNmGmPWcJVvCkUsGR4+Gzol4YskAZTa3ZkgxeSal1Xkf1Y D+ObmUWLgwL2HwLlUHk4WlisMuFx2RZnPczjDhTRVnQzpDDK18qsqplISfuO1hoxtiDI X8J+Y+hv/5l1DaJ0sJ4ZvUf7Ndn7X52EBBP5pFNne9Bm15y95hTeOgLgF7yMSCIfd9bV SurhQkc3wr0rj8iVKjMsi7UFQaXg5BF2IyAmmICRSWS1ibdYwVbO7uV8aF4av+rghW5z hAIA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wOxjgNbP3jDwLXDKff0kEy4VKMlsiC3aiae1tQGHztE=; b=Rs/6XnNT+SStCnC/KQ4AvrQRCiG5hXhaJdHeMSies0jAbvwQwgHvLtJC0W1HmX26ID bH1Z222+AH2PdY9JOcupOG9sWTWTkoLAoUd2hqTTPkoxG7FZDtulVyW2cW+tHoOdxhJj N+xKJzw5q1AfikiFMaYtAZIoo9Q04CrlgJaMiGEzRrnX8r7BDRwrmmDTArKGK4pcrp7T x59fHRkRyefNWVnCz3rNNOtZ8mtmPUmIbyvTzd7925gR4gjNMp5DixtS9Ts9bjPKGt5c FONHzIrqZDseLUXR91wWD6dSro/ZqgRJQyczuiBzbi/sMu3N0BXf3JSUS+UhQ9IKRTfY iA8g==
X-Gm-Message-State AOAM5317EL4yc+6TUUuEaQJk1SET4dbl0TktmqjfoG1Dv0nXEyElyq5+ 4O3uyUhhr8DEmOjGcOYMH57GXMswCZNHhvQ2HuU=
X-Google-Smtp-Source ABdhPJw2v8cCEVNSe2aVK0P/+Juj7C6HWDVa2gzF8ftisORv59Pp8QtQT658lrSWKOayd01ca10wGIPZY7/jfAhH2u8=
X-Received by 2002:aa7:c607:: with SMTP id h7mr9955244edq.214.1590778260155; Fri, 29 May 2020 11:51:00 -0700 (PDT)
In-Reply-To <0c4fcd5b-3ac6-ea8c-e537-b4bfc9215de4@case.edu>
Received-SPF pass client-ip=2a00:1450:4864:20::542; envelope-from=keithsthompson@gmail.com; helo=mail-ed1-x542.google.com
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -20
X-Spam_score -2.1
X-Spam_bar --
X-Spam_report (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 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 <CAAHpriN1QYMAHOqAKHr=yOJF-0tiiKDnzqawXh+DYxP7=wrDiA@mail.gmail.com>
X-Mailman-Original-References <CAAHpriPmaDcTYQLkyGqA6fM_AyVQkfN_f7p1qzkoqj-2-G1xBA@mail.gmail.com> <0c4fcd5b-3ac6-ea8c-e537-b4bfc9215de4@case.edu>
Xref csiph.com gnu.bash.bug:16318

Show key headers only | View raw


On Fri, May 29, 2020 at 11:40 AM Chet Ramey <chet.ramey@case.edu> wrote:
>
> On 5/28/20 6:12 PM, Keith Thompson wrote:
> > Configuration Information [Automatically generated, do not change]:
> > Machine: x86_64
> > OS: linux-gnu
> > Compiler: gcc
> > Compilation CFLAGS: -g -Wno-parentheses -Wno-format-security
> > uname output: Linux bomb20 5.4.0-31-generic #35-Ubuntu SMP Thu May 7
> > 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
> > Machine Type: x86_64-pc-linux-gnu
> >
> > Bash Version: 5.0
> > Patch Level: 16
> > Release Status: release
> >
> > Description:
> > bash crashes with a segmentation fault on the command:
> >     echo ~nosuchuser
> > (This assumes there is no user named "nosuchuser".  If there
> > is, pick a different name).
> >
> > It's likely this isn't a bug in bash itself, but I haven't
> > been able to figure out what's going on.
> >
> > I see this problem on copies of bash 5.0.16 and 5.0.17 built from
> > sourced on Ubuntu 20.04 LTS.  It does *not* occur with the /bin/bash
> >     GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
> > provided by the distribution.  I haven't verified how far
> > back this goes.
>
> Can you try this with the current devel branch head from savannah? I
> have a suspicion about what's going on.
>
> http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-devel.tar.gz

This did not reproduce the bug.

$ ./bash --version
GNU bash, version 5.1.0(1)-alpha (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ./bash -c 'echo ~nosuchuser'
~nosuchuser
$

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


Thread

Re: Seg fault on "echo ~nosuchuser" Keith Thompson <Keith.S.Thompson@gmail.com> - 2020-05-29 11:50 -0700

csiph-web