Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 9 Dec 2019 16:46:35 +0000
From: Leonid Isaev <leonid.isaev@...x.com>
To: oss-security@...ts.openwall.com
Subject: Re: Shell wildcards considered dangerous?

On Mon, Dec 09, 2019 at 04:28:35PM +0100, Noel Kuntze wrote:
> The message was about the attack vector on applications that put together
> argument vectors based on user input, not specifically about human use of the
> shell.

Then, why in "tar xf *.tar" the "*" is expected to mean anything other than
a literal * (0x2a)? It is because of the shell globbing: "tar xf ./*.tar" will
work without any "--". For example:
-----8<-----
$ echo -E "xxx" > "-b xxx.qwetr"
$ file *.qwetr
file: invalid option -- ' '
file: invalid option -- 'x'
file: invalid option -- 'x'
file: invalid option -- 'x'
file: invalid option -- '.'
file: invalid option -- 'q'
file: invalid option -- 'w'
Usage: file [-bcCdEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding]
            [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
            [-m <magicfiles>] [-P <parameter=value>] <file> ...
       file -C [-m <magicfiles>]
       file [--help]
$
$ file ./*.qwetr
./-b xxx.qwetr: ASCII text
----->8-----

Sincerely,
L.

Powered by blists - more mailing lists

Your e-mail address:

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.