From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36468 invoked by alias); 6 Mar 2019 16:00:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 36458 invoked by uid 89); 6 Mar 2019 16:00:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=elevated, Login, freeze, screen X-HELO: conssluserg-06.nifty.com Received: from conssluserg-06.nifty.com (HELO conssluserg-06.nifty.com) (210.131.2.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Mar 2019 15:59:58 +0000 Received: from Express5800-S70 (ntsitm424054.sitm.nt.ngn.ppp.infoweb.ne.jp [219.97.74.54]) (authenticated) by conssluserg-06.nifty.com with ESMTP id x26FxrD5006695 for ; Thu, 7 Mar 2019 00:59:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com x26FxrD5006695 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1551887993; bh=LAGYE6lRidx6zhi5ELg7riGudyNT9UHG8OMDHN0WiTk=; h=Date:From:To:Subject:From; b=Pi1BJK4m0M1oqo3zZlq9QXktbCjyVOHFRXhMrHd8V9S8R3HXo9q2TwWxPj/kiAZvB +wNYb51rH6apAII4p2rTqx30W5Dt1oEuNLcGkOV4ToGtD4Lr5Jd8K9RbfrEDj/9GYq 9G1+a2xfTC4AxXVbapboJh1UB/xNndmWnapqFU5u7YIQTKxlGxP2obl5G/BW3jGqrZ 3xwR2+/SEOenvEJx5FRa+U/t5YIz7DlHC5iO7GPB78Y8q+FiuIAGB0QQb3SXb1GudR vQzsWqjXjXahhP/lc1rmNaAeq40IzibQfTEgDsSL7h72o+I9iQZLiNm8oByR50Q3Ym R8jxJc+kfwnxw== Date: Wed, 06 Mar 2019 16:00:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: Logging-in using ssh elevates the user privilege. Message-Id: <20190307010000.fc28b73739c2dd66e609982b@nifty.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00110.txt.bz2 Hello, I would like to report a problem of recent cygwin. If a user logs in via ssh, the user aqcuires the elevated privilege if the user belongs to Administrators group. The following log is the example of the behaviour. [yano@Express5800-S70 ~]$ touch /cygdrive/c/windows/testfile touch: cannot touch '/cygdrive/c/windows/testfile': Permission denied [yano@Express5800-S70 ~]$ ssh localhost yano@localhost's password: Last login: Thu Mar 7 00:06:21 2019 from ::1 CYGWIN_NT-10.0-WOW Express5800-S70 3.0.2(0.338/5/3) 2019-03-05 19:01 i686 Cygwin [yano@Express5800-S70 ~]$ touch /cygdrive/c/windows/testfile [yano@Express5800-S70 ~]$ rm /cygdrive/c/windows/testfile [yano@Express5800-S70 ~]$ exit logout Connection to localhost closed. [yano@Express5800-S70 ~]$ Because of this behaviour, the process started in a ssh session cannot be killed from a normal mintty session. This also causes gnu screen to freeze. To reproduce this: (1) Start screen in mintty window. (2) Detatch from the screen (Ctrl-A d). (3) Login via ssh. (4) Attach screen by 'screen -r' in ssh session. (5) Detach from the screen (Ctrl-A d). (6) screen freezes and is not terminated normally. This does not occur if the user does not belong to Administrators group. I guess this is a problem of setuid codes. -- Takashi Yano -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple