From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: houjingyi <houjingyi647@gmail.com>
Cc: cygwin@cygwin.com
Subject: Re: report security problem
Date: Tue, 05 Nov 2019 11:17:00 -0000 [thread overview]
Message-ID: <20191105111739.GN3372@calimero.vinschen.de> (raw)
In-Reply-To: <CAN1eSkv02aZZb-09sYYwidexjZBNsPcMsEuit95P12r6vkccZw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
On Nov 5 17:45, houjingyi wrote:
> fhandler_console::create_invisible_console_workaround in
> newlib-cygwin\winsup\cygwin\fhandler_console.cc will call CreateProcessW to
> create a new hidden process. According to CreateProcessW documention:
>
> The lpApplicationName parameter can be NULL. In that case, the module name
> must be the first white space–delimited token in the lpCommandLine string.
> If you are using a long file name that contains a space, use quoted strings
> to indicate where the file name ends and the arguments begin; otherwise,
> the file name is ambiguous. For example, consider the string "c:\program
> files\sub dir\program name". This string can be interpreted in a number of
> ways. The system tries to interpret the possibilities in the following
> order:
> c:\program.exe
> c:\program files\sub.exe
> c:\program files\sub dir\program.exe
> c:\program files\sub dir\program name.exe
>
> Unfortunately fhandler_console::create_invisible_console_workaround did not
> use quote. This problem can be triggered by many ways since
> the component was used by other softwares. I can confirm it can at least be
> triggered by git(https://git-scm.com/download/win). Just create program.exe
> and put it to C:\problem.exe, git-bash.exe creates process mintty.exe,
> mintty.exe loads msys-2.0.dll which contains the vulnerable code and
> program.exe get executed(I will inform git too).
Thanks for the report. I pushed a patch
https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=530b866c8e47
and created new developer snapshots. Please give the today's
snapshot from https://cygwin.com/snapshots/ a try.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2019-11-05 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 9:45 houjingyi
2019-11-05 11:17 ` Corinna Vinschen [this message]
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=20191105111739.GN3372@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
--cc=houjingyi647@gmail.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).