Re: Bug reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello ALexander,

On Mon, 10 May 2021 at 05:20, Alexander Monakov <amonakov@xxxxxxxxx> 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@xxxxxxxxx> 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/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux