public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: Dave Chupreev <cdn.dev@yandex.ru>,
	 "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>,
	linux-man <linux-man@vger.kernel.org>,
	 GNU C Library <libc-alpha@sourceware.org>,
	Roland McGrath <roland@hack.frob.com>
Subject: Re: Bug reporting
Date: Mon, 10 May 2021 05:58:01 +1200	[thread overview]
Message-ID: <CAKgNAkhFQ_p98zBusCS5ycxrKjvzmGbdGw0fuTybWz2JaL239w@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.20.13.2105092008010.5297@monopod.intra.ispras.ru>

Hello ALexander,

On Mon, 10 May 2021 at 05:20, Alexander Monakov <amonakov@ispras.ru> wrote:
>
>
>
> On Mon, 10 May 2021, Michael Kerrisk (man-pages) via Libc-alpha wrote:
>
> > Hello,
> >
> > On Fri, 7 May 2021 at 02:21, Dave Chupreev <cdn.dev@yandex.ru> wrote:
> > >
> > > Well I see, I've tried on Linux and yea I didn't find any option to insert multiple definitions.
> >
> > I think the only way to insert multiple definitions is by direct
> > manipulation of 'extern char **environ'.
>
> You can cause a program to start with multiple definitions, because it is
> possible to pass arbitrarily funny stuff as 'envp' argument to execve, such as:
>
> - duplicated entries
> - entries without a '='
> - entries starting with '='
> - empty strings
> - "2 x 2 = 4"
>
> All of that will be present in the exec'd program's environment array.

Yes. I was too focussed on thinking about what an already running
program can do to its current environment. Thanks for reminding me of
the above.

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2021-05-09 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1621111620246345@mail.yandex.ru>
2021-05-05 22:37 ` Alejandro Colomar (man-pages)
     [not found]   ` <1492841620310804@mail.yandex.ru>
2021-05-09 16:40     ` Michael Kerrisk (man-pages)
2021-05-09 17:20       ` Alexander Monakov
2021-05-09 17:58         ` Michael Kerrisk (man-pages) [this message]
2004-08-09 23:38 Benno
2004-08-09 23:47 ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKgNAkhFQ_p98zBusCS5ycxrKjvzmGbdGw0fuTybWz2JaL239w@mail.gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=amonakov@ispras.ru \
    --cc=cdn.dev@yandex.ru \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=roland@hack.frob.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).