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


Groups > gnu.bash.bug > #14448

Re: bash brace issues (similar to shellshock)

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Pierre Gaston <pierre.gaston@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: bash brace issues (similar to shellshock)
Date Mon, 6 Aug 2018 19:13:41 +0300
Lines 27
Approved bug-bash@gnu.org
Message-ID <mailman.4756.1533572045.1292.bug-bash@gnu.org> (permalink)
References <CAGF5XnnB0KTsAT1ioi2=LACiqz7dwUYKe5n5aBnJGZjFf+ZD_w@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 1533572046 411 208.118.235.17 (6 Aug 2018 16:14:06 GMT)
X-Complaints-To action@cs.stanford.edu
Cc "bug-bash@gnu.org" <bug-bash@gnu.org>
To martins dada <martinsdada03@gmail.com>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8pBGYMfLfbzZ5WBt6O/EPaqjhLreUrRSpGmS1+b1Bjo=; b=I5JLIONwEYcjwKaeEE7Wk6/kfxVKiGvvvx5QyV5SHgtJWhZp+Gc8jC17iBGpPmOW6Q UzMWBpGx3XaMAsjhAgId2Qy5BYHo2jIiBH20FOZx4dGpS7ShTpymg9b1F7upKFXX/4Ps FbScwjizrAWqbHUoKL3xK8H750FEUNSr5HZJ9d+PzFwkmDtWrD7CHRynNFx+MWb2y0ha kQbzxfprEYYClXt66lBEyZ5EQXUpzOqbSpBAcbAVbraEcqxSvpdSthBAIUbEvRlN1aTF CN17TXV9R+SfKGIVPUtD+SP2W9b95+/AOWH6zxWhZgO3CtGKjQntj0l4l2exxvUjf8uD t92g==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8pBGYMfLfbzZ5WBt6O/EPaqjhLreUrRSpGmS1+b1Bjo=; b=f+AANbkHvhcAAOAP9hzro92Zj+3zZDCAgYIzNXEqOUTbff2Hzu/zJ2WZFNsQdU7/iC fjeSQfGbIGxQFmSg3pLbjLQNWIRNvie5OAVRYw2JsRuJUzHmowPN7Tp5wyjkZiLyQGRu XmtLvTJiYHPANVjBRAT7613Ucu3rhicFjl1pdZHk8xyNHnaGijMngA2XFT5U9TR0rug7 UY2sMz5zMzwo5jvHa3Y38cLFQRCmiaJ+6wXKtiLuQ4jrdUm5N/ALM1/lb9koL116lDBT Guhtvdg9gHctFG531cF8RhYQSaBKfzEEOk/4hXnn51orirnI9KNuouqMw/GYKaYoR7vP VOrw==
X-Gm-Message-State AOUpUlEur3kpLCR/y2+MigzcfVD+H7+dZz4reFHAUJ8MOlW6J29BN2aC HKFvI9eMQJGAj1PBvcKNPNTyIvZumXR+V2uLSh299Q7w
X-Google-Smtp-Source AAOMgpeXvSLl3CIYnjV/p0T1kPYsZy8/ePqN0HkGpXQNrrAgssIKuJMEvsDTHsEfTf1UTD3KhKuM90w3MmiwM0ishkg=
X-Received by 2002:a37:15da:: with SMTP id 87-v6mr13980907qkv.67.1533572041542; Mon, 06 Aug 2018 09:14:01 -0700 (PDT)
In-Reply-To <CAGF5XnnB0KTsAT1ioi2=LACiqz7dwUYKe5n5aBnJGZjFf+ZD_w@mail.gmail.com>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:400d:c09::232
X-Content-Filtered-By Mailman/MimeDel 2.1.21
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
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 <http://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>
Xref csiph.com gnu.bash.bug:14448

Show key headers only | View raw


On Mon, Aug 6, 2018 at 4:32 PM, martins dada <martinsdada03@gmail.com>
wrote:

> Find attached details regarding bash brace issues. King regards.
>

you are simply assigning (){ to a temporary environment before running the
command

$  n=(){ bash -c 'echo $n'
(){

just like:

a=foo bash -c 'echo $a'

I'd agree that I would not expect bash to accept this without quotes,
but it does not allow to execute arbitrary commands like shellshock did.
At least your examples don't show this.

Your third example is best understood if you move the redirection at the
end:

n=(){ a= date >\ echo

redirection can appear anywhere around the command
As your wrote it, it looks funny but it's not different from  "date > file"

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


Thread

Re: bash brace issues (similar to shellshock) Pierre Gaston <pierre.gaston@gmail.com> - 2018-08-06 19:13 +0300

csiph-web