delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/03/05/13:50:27

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6A79B386EC3F
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.4 cv=cagXElPM c=1 sm=1 tr=0 ts=60427d6a
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=EsEXvopRGZ0-p8nzOCMA:9 a=QEXdDO2ut3YA:10
a=sRI3_1zDfAgwuvI8zelB:22
To: cygwin AT cygwin DOT com
References: <bcd11439517f40ab91cc2673a62f4d5d AT BELBRU-EXMP104 DOT eeas DOT europa DOT eu>
<65851a08-a0d3-4fca-a956-77cf73459180 AT SystematicSw DOT ab DOT ca>
<24934718098a4d26a65b68ef62f3b46e AT BELBRU-EXMP101 DOT eeas DOT europa DOT eu>
<4125b749-86de-ae02-43d9-16ff5a8565cd AT SystematicSw DOT ab DOT ca>
<0d21a331911b4733a5e638a7c72d7ee2 AT BELBRU-EXMP101 DOT eeas DOT europa DOT eu>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Subject: Re: Home directory was not created
Message-ID: <de28fa76-080f-5129-9935-23583b7eb99d@SystematicSw.ab.ca>
Date: Fri, 5 Mar 2021 11:50:16 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.8.0
MIME-Version: 1.0
In-Reply-To: <0d21a331911b4733a5e638a7c72d7ee2@BELBRU-EXMP101.eeas.europa.eu>
X-CMAE-Envelope: MS4xfO9XMwevF2+XmRTxhZ7WIeaXZg3oMA1kdlqLni0hOw8+kdQqt5KN0tYhRiFZnQ72hGhMErwtgD1/Yygjx2ZmFF1xQp01Xr4YZEGx5mV5z6KCHKoL0Izn
5PwVSrt/Wj2SIAzHVSd1umTSWMwY3ep0G9lLPwUrsKamqnB78rNZcFm+9eCwv3sSO7hPYOF30Aj/33blX5WS40I+8E5owmqoth8=
X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 2021-03-03 04:22, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
>> -----Original Message-----
>> From: Cygwin <cygwin-bounces AT cygwin DOT com> On Behalf Of Brian Inglis
>> Sent: 02 March 2021 19:57
>>
>> On 2021-03-02 01:08, KAVALAGIOS Panagiotis (EEAS-EXT) wrote:
>>> -----Original Message-----
>>> From: KAVALAGIOS Panagiotis (EEAS-EXT)
>>> Sent: 02 March 2021 08:15
>>
>>> zip 358KB > 256KB too big I think
> 
> OK, the mystery has been resolved. There should be at least an e-mail notification to indicate that limitation. It is not polite for the list to simply ignore the submissions without saying anything :)
> 
>> All postinstall steps failed because of BLODA or installation path:
>>
>> 2021/02/09 17:48:06 running: C:\Program Files\Cygwin\bin\dash.exe
>> "/etc/postinstall/0p_000_autorebase.dash"
>>         0 [main] dash (2296) shared_info::initialize: size of shared memory region
>> changed from 49080 to 40888
>> 2021/02/09 17:48:20 abnormal exit: exit code=-1073741819 ...
>>
>> Installing under Program\ Files causes issues because of space in path names
>> and BLODA-like AV protections on those paths.
> 
> The installation is performed by powershell script that runs with the super admin (system user/nt authority) from local repository that normally bypasses all those kind of AV restrictions. I start it from the Cygwin icon that runs mintty under the hood. I don't know who took those 8KB from the script's shared memory, but indeed it looks like a BLODA interference. I will ask the package to be re-installed.
> 
> I have checked the installation logs and there was no error returned from the setup program. Shouldn't return non-zero value so that the package manager is notified about that issue? Or maybe it Is returned and I failed to propagate that in my .bat file:
> 
> ---------
> @echo off
> @echo Starting Cygwin installation
> 
> "%cd%\setup-x86_64.exe" -q -A -L -l "%cd%\cygwin-repo" -R "C:\Program Files\Cygwin" -P autoconf,automake,bash-completion,binutils,curl,dos2unix,emacs,git,git-svn,gnupg2,inetutils,jq,konsole,mc,openssh,patchutils,perl,psmisc,python2,python3,rsync,ruby,subversion,tcsh,tmux,unzip,vim,vim-common,wget,xinit,xlaunch,xorg-server,xorg-server-common,xorg-server-xorg,xorg-x11-fonts-dpi100,xorg-x11-fonts-dpi75,xorg-x11-fonts-Type1,xorg-x11-fonts-misc,xterm,zip
> ---------
> 
> Does it need "exit /b %errorlevel%"?
> 
> We are running Cygwin from "C:\Program Files" for years without issue. A space in the directory name is a very supported character for Unix and Unix-like systems as well. A quoted path that includes a space character is enough to resolve any possible issues. Unfortunately on an enterprise environment, program execution is only allowed under "C:\Program Files", so we haven't left many options. We do have prepared another directory without spaces for programs that even refuse to be installed on a path containing spaces (call me Weblogic and ColdFusion servers), but Cygwin accepts happily to be installed on a directory with spaces with a small warning. I would need to justify the non-compliance of Cygwin to be moved off "C:\Program Files" and so far I don't have any evidence.

You have just stated that there are at least two exceptions that you are aware 
of installation under Program Files, so installation and execution is not "only 
allowed" there.
Cygwin includes a lot of data files and your home directories under there and 
Windows now, and moreso in the future, disables and disallows modifications and 
changes there without elevation, or bypass of the policies requiring elevation.

The "small" warning is your interpretation, but feel free to downplay that 
evidence and ignore it at your peril, as you may not soon notice the security 
and/or integrity problems that occur because of programs and all the scripts 
that don't handle spaces safely, especially in crafted path names and argument 
values, or the problems that occur because Windows security may silently prevent 
user changes or file creation, or require security policy bypasses to allow them 
to do whatever they like under those paths.

Read up on OS/command/shell injection vulnerabilities and why patching bash for 
shellshock was just the start of a massive effort required to change every 
command in every script, and every program invoked by every script, to support 
and use features that limit the opportunities for, and effects of, vulnerability 
injections into directory and file paths and names, program and script names, 
options, and argument values.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019